2006-12-15 18:09:13 +01:00
|
|
|
--- znew.in
|
|
|
|
+++ znew.in
|
2007-01-08 22:52:58 +01:00
|
|
|
@@ -55,8 +55,9 @@
|
2006-12-15 18:09:13 +01:00
|
|
|
# block is the disk block size (best guess, need not be exact)
|
|
|
|
|
|
|
|
warn="(does not preserve modes and timestamp)"
|
|
|
|
-tmp=/tmp/zfoo.$$
|
|
|
|
-set -C
|
|
|
|
+dtmp=`mktemp -d -t znew.XXXXXXXX` || exit
|
|
|
|
+trap 'rm -rf $dtmp' HUP INT PIPE TERM 0
|
|
|
|
+tmp=$dtmp/znew
|
|
|
|
echo hi > $tmp || exit
|
|
|
|
if test -z "`(${CPMOD-cpmod} $tmp $tmp) 2>&1`"; then
|
|
|
|
cpmod=${CPMOD-cpmod}
|
2007-01-08 22:52:58 +01:00
|
|
|
@@ -72,7 +73,8 @@
|
2006-12-15 18:09:13 +01:00
|
|
|
# check if GZIP env. variable uses -S or --suffix
|
|
|
|
gzip -q $tmp
|
|
|
|
ext=`echo $tmp* | sed "s|$tmp||"`
|
|
|
|
-rm -f $tmp*
|
|
|
|
+rm -f $dtmp
|
|
|
|
+trap - HUP INT PIPE TERM 0
|
|
|
|
if test -z "$ext"; then
|
|
|
|
echo znew: error determining gzip extension
|
|
|
|
exit 1
|