calcurse-upgrade: Change location of temporary file
Instead of creating the temporary file in a central location, place it in the same directory as the configuration file. Pros: * No need to rely on the "$TMPDIR" environment variable. * Multiple users can upgrade their configuration files at the same time, even if "$!" isn't set properly. * One user can upgrade several configuration files (in different directories or with different file names) at once. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
1022781821
commit
f44b307e22
@ -40,7 +40,7 @@ if grep -q -e '^auto_save=' -e '^auto_gc=' -e '^periodic_save=' \
|
|||||||
|
|
||||||
echo "$(gettext "Pre-3.0.0 configuration file format detected...")"
|
echo "$(gettext "Pre-3.0.0 configuration file format detected...")"
|
||||||
|
|
||||||
tmpfile="${TMPDIR:-/tmp}/calcurse-upgrade.$!"
|
tmpfile="$CONFFILE.calcurse-upgrade.tmp"
|
||||||
[ -e "$tmpfile" ] && exit 1
|
[ -e "$tmpfile" ] && exit 1
|
||||||
|
|
||||||
echo -n "$(gettext "Upgrade configuration directives...")"
|
echo -n "$(gettext "Upgrade configuration directives...")"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user