about summary refs log tree commit diff
path: root/mklive.sh.in
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2013-08-11 12:16:29 +0200
committerJuan RP <xtraeme@gmail.com>2013-08-11 12:16:29 +0200
commit112a6a77756ff6afe6bffc544737171c05b19f15 (patch)
tree7ce4d391ab94bcb6f8e966a8c5b46d70c247c7f4 /mklive.sh.in
parentb877a74a49d522b2b38ebee7ae575b694a7f9f9f (diff)
downloadhrmpf-112a6a77756ff6afe6bffc544737171c05b19f15.tar.gz
hrmpf-112a6a77756ff6afe6bffc544737171c05b19f15.tar.xz
hrmpf-112a6a77756ff6afe6bffc544737171c05b19f15.zip
Add -V option to show version to void-mk{live,rootfs} and installer in the title.
Diffstat (limited to 'mklive.sh.in')
-rw-r--r--mklive.sh.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/mklive.sh.in b/mklive.sh.in
index dfc8f78..e680eec 100644
--- a/mklive.sh.in
+++ b/mklive.sh.in
@@ -29,6 +29,8 @@
 set -E
 trap "echo; error_out $LINENO $?" INT TERM HUP ERR
 
+readonly PROGNAME=$(basename $0)
+
 info_msg() {
     printf "\033[1m$@\n\033[m"
 }
@@ -110,6 +112,7 @@ Options:
                     current working directory will be used).
  -o outfile         Output file name for the ISO image.
  -s splash          Splash image file for isolinux.
+ -V                 Show version.
 _EOF
     exit 1
 }
@@ -263,7 +266,7 @@ generate_iso_image() {
 #
 # main()
 #
-while getopts "C:c:l:o:r:s:h" opt; do
+while getopts "C:c:l:o:r:s:hV" opt; do
     case $opt in
         C) CONFIG_FILE="$OPTARG";;
         c) COMPRESSTYPE="$OPTARG";;
@@ -272,6 +275,7 @@ while getopts "C:c:l:o:r:s:h" opt; do
         r) ROOTDIR="$OPTARG";;
         s) SPLASH_IMAGE="$OPTARG";;
         h) usage;;
+        V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0;;
     esac
 done
 shift $(($OPTIND - 1))