summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-01 14:31:18 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-01 16:07:48 +0200
commitf44b307e22e79beda91abaa3c417932c1d567bd0 (patch)
treeebbd7475de7629e4bf6925fa38fbbc92765fa945 /scripts
parent102278182159d51c1417716536358540010a0f8e (diff)
downloadcalcurse-f44b307e22e79beda91abaa3c417932c1d567bd0.zip
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/calcurse-upgrade.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/calcurse-upgrade.sh.in b/scripts/calcurse-upgrade.sh.in
index 8789604..c235874 100644
--- a/scripts/calcurse-upgrade.sh.in
+++ b/scripts/calcurse-upgrade.sh.in
@@ -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...")"
- tmpfile="${TMPDIR:-/tmp}/calcurse-upgrade.$!"
+ tmpfile="$CONFFILE.calcurse-upgrade.tmp"
[ -e "$tmpfile" ] && exit 1
echo -n "$(gettext "Upgrade configuration directives...")"