From f44b307e22e79beda91abaa3c417932c1d567bd0 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 1 Jun 2012 14:31:18 +0200 Subject: 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 --- scripts/calcurse-upgrade.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') 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...")" -- cgit v1.2.3