[arch-projects] [dbscripts] [PATCH 04/11] Export TMPDIR, and use mktemp -t instead of making it part of the template

Luke Shumaker lukeshu at sbcglobal.net
Sun May 17 23:44:12 UTC 2015


From: Luke Shumaker <LukeShu at sbcglobal.net>

---
 config       | 2 +-
 db-functions | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config b/config
index 6048209..b781555 100644
--- a/config
+++ b/config
@@ -23,7 +23,7 @@ LOCK_DELAY=10
 LOCK_TIMEOUT=300
 
 STAGING="$HOME/staging"
-TMPDIR="/var/tmp"
+export TMPDIR="/var/tmp"
 ARCHES=(i686 x86_64)
 DBEXT=".db.tar.gz"
 FILESEXT=".files.tar.gz"
diff --git a/db-functions b/db-functions
index 8523cff..eb61f51 100644
--- a/db-functions
+++ b/db-functions
@@ -25,7 +25,7 @@ mv_acl() {
 }
 
 # set up general environment
-WORKDIR=$(mktemp -d "${TMPDIR}/${0##*/}.XXXXXXXXXX")
+WORKDIR=$(mktemp -dt "${0##*/}.XXXXXXXXXX")
 if [ -n "${SVNUSER}" ]; then
 	setfacl -m u:"${SVNUSER}":rwx "${WORKDIR}"
 	setfacl -m d:u:"${USER}":rwx "${WORKDIR}"
-- 
2.4.1


More information about the arch-projects mailing list