Use VBoxManage if installed in the default location

This commit is contained in:
Scott Bronson
2019-03-04 21:54:20 -08:00
parent 0a219040d6
commit ccdacd0c6f
2 changed files with 16 additions and 7 deletions
+3 -1
View File
@@ -4,7 +4,7 @@ The "one key" is enter, which has to be pressed whenever the virtual machine is
The goal of the script is to allow for a very easy installation without any closed-source additions or extra bootloaders. The goal of the script is to allow for a very easy installation without any closed-source additions or extra bootloaders.
Tested on Cygwin, should work on Linux distros. Tested on Cygwin, should work on Linux distros (including WSL).
## iCloud and iMessage connectivity ## iCloud and iMessage connectivity
@@ -24,3 +24,5 @@ Developing and maintaining VirtualBox features is beyond the scope of this scrip
* `Bash`≥4 (run on Windows through [Cygwin](https://cygwin.com/install.html)) * `Bash`≥4 (run on Windows through [Cygwin](https://cygwin.com/install.html))
* `unzip`, `wget` (install through package manager) * `unzip`, `wget` (install through package manager)
* `dmg2img` (install through package manager on Linux; let the script download it automatically on Windows) * `dmg2img` (install through package manager on Linux; let the script download it automatically on Windows)
For Debian and Ubuntu: `sudo apt install d2img unzip wget`
+13 -6
View File
@@ -90,13 +90,20 @@ fi
# VirtualBox in ${PATH} # VirtualBox in ${PATH}
if [ -z "$(VBoxManage -v 2>/dev/null)" ]; then if [ -z "$(VBoxManage -v 2>/dev/null)" ]; then
echo "Please make sure VirtualBox is installed, and that the path to" if [ -x '/mnt/c/Program Files/Oracle/VirtualBox/VBoxManage.exe' ]; then
echo "the VBoxManage executable is in the PATH variable." # If VBoxManage.exe is in the standard install location, use it.
if [ -n "${windows}" ]; then echo -n "VBoxManage is usually installed in" VBoxManage () {
echo "/cygdrive/c/Program Files/Oracle/VirtualBox" '/mnt/c/Program Files/Oracle/VirtualBox/VBoxManage.exe' "$@"
echo "and can be added with PATH=\"\${PATH}:/cygdrive/c/<...>\"" }
else
echo "Please make sure VirtualBox is installed, and that the path to"
echo "the VBoxManage executable is in the PATH variable."
if [ -n "${windows}" ]; then echo -n "VBoxManage is usually installed in"
echo "/cygdrive/c/Program Files/Oracle/VirtualBox"
echo "and can be added with PATH=\"\${PATH}:/cygdrive/c/<...>\""
fi
exit
fi fi
exit
fi fi
# dmg2img # dmg2img