golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/darwin/aws/start-snapshot.sh (about)

     1  #!/bin/bash
     2  # Copyright 2022 The Go Authors. All rights reserved.
     3  # Use of this source code is governed by a BSD-style
     4  # license that can be found in the LICENSE file.
     5  
     6  # Start macOS VM from installed disk image. Changes discarded on exit.
     7  
     8  if [[ $# != 3 ]]; then
     9    echo "Usage: $0 <disk-image.qcow2> <OSK value> <VNC port index>"
    10    exit 1
    11  fi
    12  
    13  DISK=$1
    14  OSK=$2
    15  PORT=$3
    16  
    17  args=(
    18    "$DISK"
    19    "$OSK"
    20    "$PORT"
    21    -snapshot
    22  )
    23  
    24  $HOME/qemu.sh "${args[@]}"