diff --git a/shemum b/shemum index e9bf6e4..6036d6f 100755 --- a/shemum +++ b/shemum @@ -65,6 +65,7 @@ console_func function { -m $RAM -smp $CPU } +# Virtual machine initialization with a console init_func function { mkdir -p "$ROOT_PATH/$OS_NAME" qemu-img create $IMG_PATH $DISK_SIZE @@ -84,6 +85,15 @@ init_func function { -m $RAM -smp $CPU } +# Display usage +usage_func function { + printf "Usage: shemum [init] " + printf " init initialize a virtual machine" + printf " start start a QEMU virtual machine without console output" + printf " console start a QEMU virtual machine with console output" + printf " remove remove virtual machine directory and all it's contents" +} + # Options case $OPTION in # Initializes the VM and starts the installer image. @@ -100,11 +110,7 @@ case $OPTION in remove_func ;; *) - echo "Usage: shemum [init] " - echo " init initialize a virtual machine" - echo " start start a QEMU virtual machine without console output" - echo " console start a QEMU virtual machine with console output" - echo " remove remove virtual machine directory and all it's contents" + usage_func esac