From 0237dbdc0dd44bbd12e978a0dcf17d22ec6550fa Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Wed, 27 Aug 2014 13:53:50 +0200 Subject: [PATCH] labs: osbash.sh options: drop -f, add -b Add a -b option for building node VMs. This should make it harder for users to accidentally overwrite their existing VMs. It also allows us to drop the rather confusing "-f" option; "-w" without "-b" is fast now, because no local building is ordered. To build node VMs locally and Windows batch files at the same time, "-b -w" (or "-bw") can be used. Change-Id: I17ec78c0625f3657adaf670b7d58f2e4fde2248b --- labs/lib/osbash/functions.host | 2 -- labs/osbash.sh | 13 ++++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/labs/lib/osbash/functions.host b/labs/lib/osbash/functions.host index 218f49f5..5dc2ed4f 100644 --- a/labs/lib/osbash/functions.host +++ b/labs/lib/osbash/functions.host @@ -29,8 +29,6 @@ function exec_cmd { $cmd "$@" } -OSBASH=exec_cmd - #------------------------------------------------------------------------------- function get_base_disk_path { diff --git a/labs/osbash.sh b/labs/osbash.sh index dc12628c..e94e83fe 100755 --- a/labs/osbash.sh +++ b/labs/osbash.sh @@ -21,13 +21,13 @@ source "$OSBASH_LIB_DIR/virtualbox.functions" source "$OSBASH_LIB_DIR/virtualbox.install_base" function usage { - echo "Usage: $0 [-w|-f] [-g GUI] [-n] {basedisk|NODE [NODE..]}" + echo "Usage: $0 {-b|-w} [-g GUI] [-n] {basedisk|NODE [NODE..]}" echo " $0 [-e EXPORT] [-n] NODE [NODE..]" echo "" echo "-h Help" echo "-n Print configuration status and exit" - echo "-w Create Windows batch files, too" - echo "-f Only create Windows batch files (fast)" + echo "-b Build basedisk (if necessary) and node VMs (if any)" + echo "-w Create Windows batch files" echo "-g GUI VirtualBox GUI type during build" echo "-e EXPORT Export node VMs" echo "" @@ -67,7 +67,7 @@ function print_config { } -while getopts :e:fg:hnw opt; do +while getopts :be:g:hnw opt; do case $opt in e) if [ "$OPTARG" = ova ]; then @@ -79,9 +79,8 @@ while getopts :e:fg:hnw opt; do exit fi ;; - f) - source "$LIB_DIR/wbatch/batch_for_windows" - unset OSBASH + b) + OSBASH=exec_cmd ;; g) if [[ "$OPTARG" =~ (headless|gui|sdl) ]]; then