dictionary and other global functions re-globaled
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
# One-key semi-automatic installer of macOS on VirtualBox
|
# One-key semi-automatic installer of macOS on VirtualBox
|
||||||
# (c) img2tab, licensed under GPL2.0 or higher
|
# (c) img2tab, licensed under GPL2.0 or higher
|
||||||
# url: https://github.com/img2tab/macos-guest-virtualbox
|
# url: https://github.com/img2tab/macos-guest-virtualbox
|
||||||
# version 0.47
|
# version 0.48
|
||||||
|
|
||||||
# Requirements: 33.5GB available storage on host
|
# Requirements: 33.5GB available storage on host
|
||||||
# Dependencies: bash>=4.0, unzip, wget, dmg2img,
|
# Dependencies: bash>=4.0, unzip, wget, dmg2img,
|
||||||
@@ -244,7 +244,6 @@ VBoxManage setextradata "${vmname}" \
|
|||||||
"VBoxInternal/Devices/efi/0/Config/DmiSystemSerial" "${serialnumber}"
|
"VBoxInternal/Devices/efi/0/Config/DmiSystemSerial" "${serialnumber}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function initialize_script_functions() {
|
|
||||||
# QWERTY-to-scancode dictionary. Hex scancodes, keydown and keyup event.
|
# QWERTY-to-scancode dictionary. Hex scancodes, keydown and keyup event.
|
||||||
# Virtualbox Mac scancodes found here:
|
# Virtualbox Mac scancodes found here:
|
||||||
# https://wiki.osdev.org/PS/2_Keyboard#Scan_Code_Set_1
|
# https://wiki.osdev.org/PS/2_Keyboard#Scan_Code_Set_1
|
||||||
@@ -434,8 +433,6 @@ Press enter when the Terminal command prompt is ready.'${defaultcolor}
|
|||||||
read -p ""
|
read -p ""
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
# Start the virtual machine. This should take a couple of minutes.
|
# Start the virtual machine. This should take a couple of minutes.
|
||||||
function populate_virtual_disks() {
|
function populate_virtual_disks() {
|
||||||
echo "Starting virtualmachine ${vmname}. This should take a couple of minutes."
|
echo "Starting virtualmachine ${vmname}. This should take a couple of minutes."
|
||||||
@@ -662,12 +659,10 @@ if [ -z "${1}" ]; then
|
|||||||
create_install_vdi
|
create_install_vdi
|
||||||
attach_initial_storage
|
attach_initial_storage
|
||||||
configure_vm
|
configure_vm
|
||||||
initialize_script_functions
|
|
||||||
populate_virtual_disks
|
populate_virtual_disks
|
||||||
install_the_installer
|
install_the_installer
|
||||||
boot_macos_installer
|
boot_macos_installer
|
||||||
else
|
else
|
||||||
check_dependencies
|
check_dependencies
|
||||||
initialize_script_functions
|
|
||||||
for argument in $@; do ${argument}; done
|
for argument in $@; do ${argument}; done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user