summaryrefslogtreecommitdiffstats
path: root/scripts/calcurse-upgrade
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-05-23 16:41:47 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-05-23 16:41:47 +0200
commitde114ce437d5f34db52a3acd7e17672ea6d76336 (patch)
tree45a10dbc1ec491e2992badf05ab5978b918a340b /scripts/calcurse-upgrade
parent7bec0d47ee2b4a0438e83c15dd152e531e334a46 (diff)
downloadcalcurse-de114ce437d5f34db52a3acd7e17672ea6d76336.tar.gz
calcurse-de114ce437d5f34db52a3acd7e17672ea6d76336.zip
scripts/calcurse-upgrade: Add debug output
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'scripts/calcurse-upgrade')
-rw-r--r--scripts/calcurse-upgrade7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/calcurse-upgrade b/scripts/calcurse-upgrade
index e04b2f9..271ade4 100644
--- a/scripts/calcurse-upgrade
+++ b/scripts/calcurse-upgrade
@@ -22,9 +22,13 @@ if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
-e '^notify-all=' -e '^output_datefmt=' -e '^input_datefmt=' \
-e '^notify-daemon_enable=' -e '^notify-daemon_log=' "$CONFFILE"; then
+ echo "Pre-3.0.0 configuration file format detected..."
+
tmpfile="${TMPDIR:-/tmp}/calcurse-upgrade.$!"
[ -e "$tmpfile" ] && exit 1
+ echo -n "Upgrade configuration directives..."
+
sed -e 's/^auto_save=/general.autosave=/' \
-e 's/^auto_gc=/general.autogc=/' \
-e 's/^periodic_save=/general.periodicsave=/' \
@@ -83,5 +87,8 @@ if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
{ print }
' < "$CONFFILE" > "$tmpfile"
mv "$tmpfile" "$CONFFILE"
+
+ echo -n ' '
+ echo 'done'
fi