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
+13 -6
View File
@@ -90,13 +90,20 @@ fi
# VirtualBox in ${PATH}
if [ -z "$(VBoxManage -v 2>/dev/null)" ]; then
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/<...>\""
if [ -x '/mnt/c/Program Files/Oracle/VirtualBox/VBoxManage.exe' ]; then
# If VBoxManage.exe is in the standard install location, use it.
VBoxManage () {
'/mnt/c/Program Files/Oracle/VirtualBox/VBoxManage.exe' "$@"
}
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
exit
fi
# dmg2img