diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-06-01 14:18:05 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-06-01 16:07:48 +0200 |
commit | 102278182159d51c1417716536358540010a0f8e (patch) | |
tree | 971439d2b7e1326b43bb0c7e0bf7c4e69b827dd9 /scripts | |
parent | 9be3a9c1f09448652e7b91e6722968ac79f5aa4d (diff) | |
download | calcurse-102278182159d51c1417716536358540010a0f8e.zip |
calcurse-upgrade: Add "-h" and "-v" options
Add "-h"/"--help" options to print a usage message and "-v"/"--version"
to print the current version.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/calcurse-upgrade.sh.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/calcurse-upgrade.sh.in b/scripts/calcurse-upgrade.sh.in index bf3f92e..8789604 100644 --- a/scripts/calcurse-upgrade.sh.in +++ b/scripts/calcurse-upgrade.sh.in @@ -9,6 +9,15 @@ CONFFILE=$HOME/.calcurse/conf if [ "$#" -gt 0 ]; then if [ "$1" = "--config" ]; then CONFFILE=$2 + elif [ "$1" = "-h" -o "$1" = "--help" ]; then + echo "calcurse-upgrade @PACKAGE_VERSION@" + echo "$(gettext "Usage: calcurse-upgrade [-h|-v|--config <file>]")" + elif [ "$1" = "-v" -o "$1" = "--version" ]; then + echo "calcurse-upgrade @PACKAGE_VERSION@" + echo "$(gettext " +Copyright (c) 2004-2012 calcurse Development Team. +This is free software; see the source for copying conditions. +")" else echo "$(gettext "unrecognized option:") \"$1\"" >&2 exit 1 |