calcurse-upgrade: Display error if temp file exists

Instead of bailing out without any hint, show an error message if the
temporary file we use in calcurse-upgrade already exists.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2012-06-01 15:47:18 +02:00
parent f44b307e22
commit fa1f0a5c44

View File

@ -41,7 +41,13 @@ if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
echo "$(gettext "Pre-3.0.0 configuration file format detected...")"
tmpfile="$CONFFILE.calcurse-upgrade.tmp"
[ -e "$tmpfile" ] && exit 1
if [ -e "$tmpfile" ]; then
echo "$(gettext "Old temporary file found:") \"$tmpfile\"" >&2
echo "$(gettext "
If a previous conversion did not complete, please try to remove this file and
start over with a backup of your old configuration file.")" >&2
exit 1
fi
echo -n "$(gettext "Upgrade configuration directives...")"