1 http://cvs.fedoraproject.org/viewvc/devel/gzip/gzip-1.3.12-openbsd-owl-tmp.patch?view=co
3 --- gzip-1.3.12/znew.in.owl-tmp 2007-06-04 09:15:11.000000000 +0200
4 +++ gzip-1.3.12/znew.in 2007-06-04 09:23:18.000000000 +0200
6 # block is the disk block size (best guess, need not be exact)
8 warn="(does not preserve modes and timestamp)"
9 -tmp=${TMPDIR-/tmp}/zfoo.$$
11 -echo hi > $tmp || exit
12 -if test -z "`(${CPMOD-cpmod} $tmp $tmp) 2>&1`"; then
13 - cpmod=${CPMOD-cpmod}
16 +if type ${CPMOD:-cpmod} 2>/dev/null; then
17 + cpmod=${CPMOD:-cpmod}
21 -if test -z "$cpmod" && ${TOUCH-touch} -r $tmp $tmp 2>/dev/null; then
22 - cpmod="${TOUCH-touch}"
23 +if test -z "$cpmod"; then
26 warn="(does not preserve file modes)"
29 -# check if GZIP env. variable uses -S or --suffix
31 -ext=`echo $tmp* | sed "s|$tmp||"`
33 -if test -z "$ext"; then
34 - echo znew: error determining gzip extension
38 + *-S*) ext=`echo "$GZIP" | sed 's/^.*-S[[:space:]]*\([^[:space:]]*\).*$/\1/'`
40 + *-suffix*) ext=`echo "$GZIP" | sed 's/^.*--suffix=\([^[:space:]]*\).*$/\1/'`
45 if test "$ext" = ".Z"; then
46 echo znew: cannot use .Z as gzip extension.