Use TMPDIR from environment if available

Makes it function like the mktemp program, others.
This commit is contained in:
Dan Church 2023-07-29 11:47:53 -05:00
parent bdc3da32ee
commit 59fe208548
No known key found for this signature in database
GPG key ID: EA2BF379CD2CDBD0

View file

@ -61,7 +61,7 @@ fi
NODE_PKG=$1
PRGNAM=$(echo "$NODE_PKG" | tr / _ | sed 's|^@||' | cut -d@ -f1)
PKG=/tmp/$TAG/pkg-$PRGNAM
PKG=${TMPDIR:-/tmp}/$TAG/pkg-$PRGNAM
[ -e "$PKG" ] && rm -fr "$PKG"
mkdir -p "$PKG"