Honor TMPDIR environment variable

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@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-10-13 11:03:35 +02:00
parent dcb80e7b5c
commit a0c6bf4556
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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.