Add -V option to show version to void-mk{live,rootfs} and installer in the title.

This commit is contained in:
Juan RP
2013-08-11 12:16:29 +02:00
parent b877a74a49
commit 112a6a7775
3 changed files with 9 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ die() {
}
usage() {
echo "Usage: $PROGNAME [-a raspberrypi]"
echo "Usage: $PROGNAME [-a raspberrypi] [-V]"
}
run_cmd() {
@@ -72,10 +72,11 @@ register_binfmt() {
#
# main()
#
while getopts "a:h" opt; do
while getopts "a:hV" opt; do
case $opt in
a) TARGET_ARCH="$OPTARG";;
h) usage; exit 0;;
V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0;;
esac
done
shift $(($OPTIND - 1))