aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-01 14:18:05 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-01 16:07:48 +0200
commit102278182159d51c1417716536358540010a0f8e (patch)
tree971439d2b7e1326b43bb0c7e0bf7c4e69b827dd9 /scripts
parent9be3a9c1f09448652e7b91e6722968ac79f5aa4d (diff)
downloadcalcurse-102278182159d51c1417716536358540010a0f8e.tar.gz
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.in9
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