aboutsummaryrefslogtreecommitdiff
path: root/litterbox
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-08-27 02:29:56 -0400
committerB. Watson <urchlay@slackware.uk>2026-08-27 02:29:56 -0400
commite17326698209b9aedc14c7d9efbd0937b8f5337b (patch)
tree810e39d5729d7fd82bbdb102d056d0b27d39e747 /litterbox
parent076ce76e392f37c8c0520b528668f0ccb90e204f (diff)
downloadmisc-scripts-e17326698209b9aedc14c7d9efbd0937b8f5337b.tar.gz
litterbox: don't inherit TMP from environment.
Diffstat (limited to 'litterbox')
-rwxr-xr-xlitterbox4
1 files changed, 2 insertions, 2 deletions
diff --git a/litterbox b/litterbox
index 499fe9d..ad730ab 100755
--- a/litterbox
+++ b/litterbox
@@ -104,7 +104,7 @@ compress_file() {
basefile="$( basename "$FILE" )"
# TODO: create a random tmp dir, don't use /tmp!
- TMPFILE="${TMP:-/tmp}/$basefile$ext"
+ TMPFILE="$TMP/$basefile$ext"
rm -f "$TMPFILE"
if [ "$ZIP" = "1" ]; then
zip -qr "$TMPFILE" "$FILE"
@@ -142,7 +142,7 @@ upload_file() {
if [ "$use_compression" = 1 ]; then
# can't easily zip stdin, write it to a file
if [ "$FILE" = "-" ]; then
- FILE="${TMP:-/tmp}/$SELF.stdin"
+ FILE="$TMP/$SELF.stdin"
cat > "$FILE"
if [ "$?" != 0 ]; then
rm -f "$FILE"