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
This commit is contained in:
Roger Luethi 2014-08-27 13:53:50 +02:00
parent e8bbe8a28d
commit 0237dbdc0d
2 changed files with 6 additions and 9 deletions

View File

@ -29,8 +29,6 @@ function exec_cmd {
$cmd "$@"
}
OSBASH=exec_cmd
#-------------------------------------------------------------------------------
function get_base_disk_path {

View File

@ -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