Created
September 10, 2014 15:09
-
-
Save npf/26b2c25f20a1cd5a827b to your computer and use it in GitHub Desktop.
Revisions
-
npf created this gist
Sep 10, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/bin/bash VBOXMANAGE=/usr/bin/VBoxManage VBOXVMDIR="$HOME/VirtualBox VMs" VAGRANTVMDIR="/tmp/vagrant" LOGFILE=/tmp/vagrant/vboxmanage.$(date +%s) echo "$0 $@" >> $LOGFILE if [ "$1" == "import" ]; then declare -a ARGS while [ $# -gt 0 ]; do ARGS=(${ARGS[@]} ${1/$VBOXVMDIR/$VAGRANTVMDIR}) shift done echo "===> $VBOXMANAGE ${ARGS[@]}" >> $LOGFILE exec $VBOXMANAGE "${ARGS[@]}" fi exec $VBOXMANAGE "$@"