[arch-projects] [PATCH namcap 2/2] Honor TMPDIR environment variable

Dan McGee dan at archlinux.org
Thu Sep 8 20:18:13 EDT 2011


If we use the `mktemp --tmpdir` option, we are able to honor TMPDIR
without much difficulty. Change the template to not hardcode '/tmp'.

Signed-off-by: Dan McGee <dan at archlinux.org>
---
 namcap |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/namcap b/namcap
index edb9de8..47d7f16 100755
--- a/namcap
+++ b/namcap
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 args=''
-tmp=$(mktemp -d /tmp/namcap.XXXXXXXXXX)
+tmp=$(mktemp -d --tmpdir namcap.XXXXXXXXXX)
 cleanup() {
 	rm -rf "${tmp}"
 }
-- 
1.7.6.1



More information about the arch-projects mailing list