OBS User unknown
2007-01-08 21:52:58 +00:00
committed by Git OBS Bridge
parent d54774ae10
commit fd3dbe9010
6 changed files with 49 additions and 74 deletions

View File

@@ -1,26 +1,6 @@
--- zdiff.in
+++ zdiff.in
@@ -59,12 +59,12 @@
case "$2" in
*[-.]gz* | *[-.][zZ] | *.t[ga]z)
F=`echo "$2" | sed 's|.*/||;s|[-.][zZtga]*||'`
- set -C
- trap 'rm -f /tmp/"$F".$$; exit 2' HUP INT PIPE TERM 0
- gzip -cdfq -- "$2" > /tmp/"$F".$$ || exit
- gzip -cdfq -- "$1" | $comp $OPTIONS - /tmp/"$F".$$
+ TF=`/bin/mktemp -t "$F".XXXXXXXX` || exit 1
+ trap 'rm -f "$TF"; exit 2' HUP INT PIPE TERM 0
+ gzip -cdfq -- "$2" > "$TF" || exit
+ gzip -cdfq -- "$1" | $comp $OPTIONS - "$TF"
STAT="$?"
- /bin/rm -f /tmp/"$F".$$ || STAT=2
+ /bin/rm -f "$TF" || STAT=2
trap - HUP INT PIPE TERM 0
exit $STAT;;
--- znew.in
+++ znew.in
@@ -56,8 +56,9 @@
@@ -55,8 +55,9 @@
# block is the disk block size (best guess, need not be exact)
warn="(does not preserve modes and timestamp)"
@@ -32,7 +12,7 @@
echo hi > $tmp || exit
if test -z "`(${CPMOD-cpmod} $tmp $tmp) 2>&1`"; then
cpmod=${CPMOD-cpmod}
@@ -73,7 +74,8 @@
@@ -72,7 +73,8 @@
# check if GZIP env. variable uses -S or --suffix
gzip -q $tmp
ext=`echo $tmp* | sed "s|$tmp||"`