X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=znew.in;h=e9e173fd68cc8f8cefabae14e5c45ddca829c35b;hb=db00b4e39677b0dbf3ea6f7694e0eac7be4ef141;hp=ebf87abc2bdef2f3409b76a4e48c79dd00e15f14;hpb=302189d124ed5849c2589ea92e912eb24fdc4ab3;p=gzip diff --git a/znew.in b/znew.in index ebf87ab..e9e173f 100755 --- a/znew.in +++ b/znew.in @@ -16,8 +16,8 @@ block=1024 warn="(does not preserve modes and timestamp)" tmp=/tmp/zfoo.$$ set -C -echo hi > $tmp.1 -echo hi > $tmp.2 +echo hi > $tmp.1 || exit 1 +echo hi > $tmp.2 || exit 1 if test -z "`(${CPMOD-cpmod} $tmp.1 $tmp.2) 2>&1`"; then cpmod=${CPMOD-cpmod} warn="" @@ -120,8 +120,8 @@ for i do fi fi test $keep -eq 1 && new=`wc -c < "$n$ext"` - if test $keep -eq 1 -a `expr \( $old + $block - 1 \) / $block` -lt \ - `expr \( $new + $block - 1 \) / $block`; then + if test $keep -eq 1 && test `expr \( $old + $block - 1 \) / $block` -lt \ + `expr \( $new + $block - 1 \) / $block`; then if test $pipe -eq 1; then rm -f "$n$ext" elif test $check -eq 1; then