golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/darwin/aws/start-installer.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 installer to install to disk image. 7 8 if [[ $# != 4 ]]; then 9 echo "Usage: $0 <disk-image.qcow2> <opencore.img> <macos-recovery.dmg> <OSK value>" 10 exit 1 11 fi 12 13 DISK=$1 14 OPENCORE=$2 15 RECOVERY=$3 16 OSK=$4 17 PORT=1 18 19 args=( 20 "$DISK" 21 "$OSK" 22 "$PORT" 23 -drive id=OpenCoreBoot,if=none,format=raw,file="$OPENCORE" 24 -device ide-hd,bus=sata.3,drive=OpenCoreBoot 25 -drive id=InstallMedia,if=none,format=raw,file="$RECOVERY" 26 -device ide-hd,bus=sata.4,drive=InstallMedia 27 ) 28 29 $HOME/qemu.sh "${args[@]}"