From fbbcc30e3dbe16f34c94d210f3c7c74762216874 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 2 Nov 2011 21:51:09 +0100 Subject: lib/common.sh: Revise setup_workdir() * Honor TMPDIR variable (just like we did in commit a0c6bf45). * Quote path properly. * Avoid unnecessary use of basename(1). Signed-off-by: Lukas Fleischer Signed-off-by: Pierre Schmitz --- lib/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.sh b/lib/common.sh index e826e97..6bbf6de 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -58,7 +58,7 @@ stat_done() { } setup_workdir() { - [[ -z $WORKDIR ]] && WORKDIR=$(mktemp -d /tmp/$(basename $0).XXXXXXXXXX) + [[ -z $WORKDIR ]] && WORKDIR=$(mktemp -d --tmpdir "${0##*/}.XXXXXXXXXX") } cleanup() { -- cgit v1.2.3-24-g4f1b