Commit a0c6bf45 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

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: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent dcb80e7b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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.