diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-06-01 14:31:18 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-06-01 16:07:48 +0200 |
commit | f44b307e22e79beda91abaa3c417932c1d567bd0 (patch) | |
tree | ebbd7475de7629e4bf6925fa38fbbc92765fa945 | |
parent | 102278182159d51c1417716536358540010a0f8e (diff) | |
download | calcurse-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>
-rw-r--r-- | scripts/calcurse-upgrade.sh.in | 2 |
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...")" |