scripts/calcurse-upgrade: Add debug output

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2012-05-23 16:41:47 +02:00
parent 7bec0d47ee
commit de114ce437

View File

@ -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-all=' -e '^output_datefmt=' -e '^input_datefmt=' \
-e '^notify-daemon_enable=' -e '^notify-daemon_log=' "$CONFFILE"; then -e '^notify-daemon_enable=' -e '^notify-daemon_log=' "$CONFFILE"; then
echo "Pre-3.0.0 configuration file format detected..."
tmpfile="${TMPDIR:-/tmp}/calcurse-upgrade.$!" tmpfile="${TMPDIR:-/tmp}/calcurse-upgrade.$!"
[ -e "$tmpfile" ] && exit 1 [ -e "$tmpfile" ] && exit 1
echo -n "Upgrade configuration directives..."
sed -e 's/^auto_save=/general.autosave=/' \ sed -e 's/^auto_save=/general.autosave=/' \
-e 's/^auto_gc=/general.autogc=/' \ -e 's/^auto_gc=/general.autogc=/' \
-e 's/^periodic_save=/general.periodicsave=/' \ -e 's/^periodic_save=/general.periodicsave=/' \
@ -83,5 +87,8 @@ if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
{ print } { print }
' < "$CONFFILE" > "$tmpfile" ' < "$CONFFILE" > "$tmpfile"
mv "$tmpfile" "$CONFFILE" mv "$tmpfile" "$CONFFILE"
echo -n ' '
echo 'done'
fi fi