[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Small suggestion for znew.in
From: |
Juan Manuel Guerrero |
Subject: |
Small suggestion for znew.in |
Date: |
Sun, 25 Mar 2007 21:22:13 +0200 |
User-agent: |
KMail/1.8.2 |
I would like to suggest to use TMPDIR before to default to /tmp.
This makes it easier to port gzip to no posix OSs.
Regards,
Juan M. Guerrero
diff -aprNU5 gzip-1.3.11.orig/znew.in gzip-1.3.11/znew.in
--- gzip-1.3.11.orig/znew.in 2007-02-05 20:54:26 +0000
+++ gzip-1.3.11/znew.in 2007-03-25 21:09:54 +0000
@@ -53,11 +53,11 @@ old=0
new=0
block=1024
# block is the disk block size (best guess, need not be exact)
warn="(does not preserve modes and timestamp)"
-tmp=/tmp/zfoo.$$
+tmp=${TMPDIR-/tmp}/zfoo.$$
set -C
echo hi > $tmp || exit
if test -z "`(${CPMOD-cpmod} $tmp $tmp) 2>&1`"; then
cpmod=${CPMOD-cpmod}
warn=""
- Small suggestion for znew.in,
Juan Manuel Guerrero <=