diff options
-rw-r--r-- | scripts/calcurse-upgrade.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/calcurse-upgrade.sh b/scripts/calcurse-upgrade.sh index 5c7aaea..bf3f92e 100644 --- a/scripts/calcurse-upgrade.sh +++ b/scripts/calcurse-upgrade.sh @@ -4,10 +4,15 @@ export TEXTDOMAIN='calcurse' set -e -if [ "$1" = "--config" ]; then - CONFFILE=$2 -else - CONFFILE=$HOME/.calcurse/conf +CONFFILE=$HOME/.calcurse/conf + +if [ "$#" -gt 0 ]; then + if [ "$1" = "--config" ]; then + CONFFILE=$2 + else + echo "$(gettext "unrecognized option:") \"$1\"" >&2 + exit 1 + fi fi if [ ! -e "$CONFFILE" ]; then |