From 35e6136f4b1b45a7cb736ca0608da7f44c74b233 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 13 Oct 2011 17:23:21 +0200 Subject: scripts/*.sh.in: Honor TMPDIR environment variable Replace "/tmp" with "${TMPDIR:-/tmp}" to allow for overriding the hardcoded path. Since we only use "/tmp" in conjunction with mktemp(1), we could also have used "--tmpdir", which is GNU-ish, however (and the BSD counterpart "-t" has been deprecated in GNU mktemp). Signed-off-by: Lukas Fleischer Signed-off-by: Dan McGee --- scripts/repo-add.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/repo-add.sh.in') diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 29b150c8..ff3511c1 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -560,7 +560,7 @@ if [[ $cmd != "repo-add" && $cmd != "repo-remove" ]]; then exit 1 fi -tmpdir=$(mktemp -d /tmp/repo-tools.XXXXXXXXXX) || (\ +tmpdir=$(mktemp -d "${TMPDIR:-/tmp}/repo-tools.XXXXXXXXXX") || (\ error "$(gettext "Cannot create temp directory for database building.")"; \ exit 1) mkdir $tmpdir/tree -- cgit v1.2.3-24-g4f1b