[arch-projects] [devtools] [PATCH] Honor TMPDIR environment variable
Lukas Fleischer
archlinux at cryptocrack.de
Thu Oct 13 05:09:50 EDT 2011
Replace all mktemp(1) invocations that hardcode "/tmp" with `mktemp
--tmpdir` and change templates accordingly.
Note that "--tmpdir" is GNU-ish which is okay given that we currently
support Arch Linux only anyway.
Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
checkpkg | 2 +-
lddd | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/checkpkg b/checkpkg
index 94a7529..cde3dc2 100755
--- a/checkpkg
+++ b/checkpkg
@@ -24,7 +24,7 @@ if [[ $arch == 'any' ]]; then
fi
STARTDIR=$(pwd)
-TEMPDIR=$(mktemp -d /tmp/checkpkg-script.XXXX)
+TEMPDIR=$(mktemp -d --tmpdir checkpkg-script.XXXX)
cd "$TEMPDIR"
for _pkgname in "${pkgname[@]}"; do
diff --git a/lddd b/lddd
index 9695c9b..c011674 100755
--- a/lddd
+++ b/lddd
@@ -9,7 +9,7 @@ IFS="${IFS}:"
libdirs="/lib /usr/lib /usr/local/lib $(cat /etc/ld.so.conf.d/*)"
extras=
-TEMPDIR=$(mktemp -d /tmp/lddd-script.XXXX)
+TEMPDIR=$(mktemp -d --tmpdir lddd-script.XXXX)
echo 'Go out and drink some tea, this will take a while :) ...'
# Check ELF binaries in the PATH and specified dir trees.
--
1.7.7
More information about the arch-projects
mailing list