]>
Commit | Line | Data |
---|---|---|
c192dc6f MT |
1 | http://cvs.fedoraproject.org/viewvc/devel/gzip/gzip-1.3.12-openbsd-owl-tmp.patch?view=co |
2 | ||
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 | |
5 | @@ -55,28 +55,27 @@ | |
6 | # block is the disk block size (best guess, need not be exact) | |
7 | ||
8 | warn="(does not preserve modes and timestamp)" | |
9 | -tmp=${TMPDIR-/tmp}/zfoo.$$ | |
10 | -set -C | |
11 | -echo hi > $tmp || exit | |
12 | -if test -z "`(${CPMOD-cpmod} $tmp $tmp) 2>&1`"; then | |
13 | - cpmod=${CPMOD-cpmod} | |
14 | +cpmod= | |
15 | +cpmodarg= | |
16 | +if type ${CPMOD:-cpmod} 2>/dev/null; then | |
17 | + cpmod=${CPMOD:-cpmod} | |
18 | warn="" | |
19 | fi | |
20 | ||
21 | -if test -z "$cpmod" && ${TOUCH-touch} -r $tmp $tmp 2>/dev/null; then | |
22 | - cpmod="${TOUCH-touch}" | |
23 | +if test -z "$cpmod"; then | |
24 | + cpmod=touch | |
25 | cpmodarg="-r" | |
26 | warn="(does not preserve file modes)" | |
27 | fi | |
28 | ||
29 | -# check if GZIP env. variable uses -S or --suffix | |
30 | -gzip -q $tmp | |
31 | -ext=`echo $tmp* | sed "s|$tmp||"` | |
32 | -rm -f $tmp* | |
33 | -if test -z "$ext"; then | |
34 | - echo znew: error determining gzip extension | |
35 | - exit 1 | |
36 | -fi | |
37 | +case "$GZIP" in | |
38 | + *-S*) ext=`echo "$GZIP" | sed 's/^.*-S[[:space:]]*\([^[:space:]]*\).*$/\1/'` | |
39 | + ;; | |
40 | + *-suffix*) ext=`echo "$GZIP" | sed 's/^.*--suffix=\([^[:space:]]*\).*$/\1/'` | |
41 | + ;; | |
42 | + *) ext='.gz' | |
43 | + ;; | |
44 | +esac | |
45 | if test "$ext" = ".Z"; then | |
46 | echo znew: cannot use .Z as gzip extension. | |
47 | exit 1 |