summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-11-02 21:51:09 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-11-04 19:34:00 +0100
commitfbbcc30e3dbe16f34c94d210f3c7c74762216874 (patch)
tree0ac877265cf08a0ce29aaf9ea9c2599e81b87361
parentc1752bd716c3796f55a0197b87554f603b73034b (diff)
downloaddevtools32-fbbcc30e3dbe16f34c94d210f3c7c74762216874.tar.xz
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 <archlinux@cryptocrack.de> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
-rw-r--r--lib/common.sh2
1 files changed, 1 insertions, 1 deletions
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() {