1 --- gzip-1.3.12/znew.in.owl-tmp 2007-06-04 09:15:11.000000000 +0200
2 +++ gzip-1.3.12/znew.in 2007-06-04 09:23:18.000000000 +0200
4 # block is the disk block size (best guess, need not be exact)
6 warn="(does not preserve modes and timestamp)"
7 -tmp=${TMPDIR-/tmp}/zfoo.$$
9 -echo hi > $tmp || exit
10 -if test -z "`(${CPMOD-cpmod} $tmp $tmp) 2>&1`"; then
11 - cpmod=${CPMOD-cpmod}
14 +if type ${CPMOD:-cpmod} 2>/dev/null; then
15 + cpmod=${CPMOD:-cpmod}
19 -if test -z "$cpmod" && ${TOUCH-touch} -r $tmp $tmp 2>/dev/null; then
20 - cpmod="${TOUCH-touch}"
21 +if test -z "$cpmod"; then
24 warn="(does not preserve file modes)"
27 -# check if GZIP env. variable uses -S or --suffix
29 -ext=`echo $tmp* | sed "s|$tmp||"`
31 -if test -z "$ext"; then
32 - echo znew: error determining gzip extension
36 + *-S*) ext=`echo "$GZIP" | sed 's/^.*-S[[:space:]]*\([^[:space:]]*\).*$/\1/'`
38 + *-suffix*) ext=`echo "$GZIP" | sed 's/^.*--suffix=\([^[:space:]]*\).*$/\1/'`
43 if test "$ext" = ".Z"; then
44 echo znew: cannot use .Z as gzip extension.