summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/calcurse-upgrade11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/calcurse-upgrade b/scripts/calcurse-upgrade
index 1fc481f..e04b2f9 100644
--- a/scripts/calcurse-upgrade
+++ b/scripts/calcurse-upgrade
@@ -2,7 +2,16 @@
set -e
-CONFFILE=$HOME/.calcurse/conf
+if [ "$1" = "--config" ]; then
+ CONFFILE=$2
+else
+ CONFFILE=$HOME/.calcurse/conf
+fi
+
+if [ ! -e "$CONFFILE" ]; then
+ echo "Configuration file not found: $CONFFILE" >&2
+ exit 1
+fi
if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
-e '^confirm_quit=' -e '^confirm_delete=' -e '^skip_system_dialogs=' \