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:
parent
dcb80e7b5c
commit
a0c6bf4556
|
@ -24,7 +24,7 @@ if [[ $arch == 'any' ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
STARTDIR=$(pwd)
|
STARTDIR=$(pwd)
|
||||||
TEMPDIR=$(mktemp -d /tmp/checkpkg-script.XXXX)
|
TEMPDIR=$(mktemp -d --tmpdir checkpkg-script.XXXX)
|
||||||
cd "$TEMPDIR"
|
cd "$TEMPDIR"
|
||||||
|
|
||||||
for _pkgname in "${pkgname[@]}"; do
|
for _pkgname in "${pkgname[@]}"; do
|
||||||
|
|
2
lddd.in
2
lddd.in
|
@ -9,7 +9,7 @@ IFS="${IFS}:"
|
||||||
libdirs="/lib /usr/lib /usr/local/lib $(cat /etc/ld.so.conf.d/*)"
|
libdirs="/lib /usr/lib /usr/local/lib $(cat /etc/ld.so.conf.d/*)"
|
||||||
extras=
|
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 :) ...'
|
echo 'Go out and drink some tea, this will take a while :) ...'
|
||||||
# Check ELF binaries in the PATH and specified dir trees.
|
# Check ELF binaries in the PATH and specified dir trees.
|
||||||
|
|
Loading…
Reference in New Issue