- *[-.]gz* | *[-.][zZ] | *.t[ga]z | -)
- if test "$1$2" = --; then
- gzip_status=$(
- exec 4>&1
- (gzip -cdfq - 4>&-; echo $? >&4) 3>&- |
- eval "$cmp" - - >&3
- )
- elif
- # Reject Solaris 8's buggy /bin/bash 2.03.
- echo X |
- (echo X | eval "$cmp" /dev/fd/5 - >/dev/null 2>&1) \
- 5<&0
- then
- gzip_status=$(
- exec 4>&1
- (gzip -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- |
- ( (gzip -cdfq -- "$2" 4>&-; echo $? >&4) 3>&- 5<&- </dev/null |
- eval "$cmp" /dev/fd/5 -) 5<&0
- )
- case $gzip_status in
- *[1-9]*) gzip_status=1;;
- *) gzip_status=0;;
- esac
- else
- F=`expr "/$2" : '.*/\(.*\)[-.][zZtga]*$'` || F=$prog
- tmp=
- trap '
- test -n "$tmp" && rm -f "$tmp"
- (exit 2); exit 2
- ' HUP INT PIPE TERM 0
- if type mktemp >/dev/null 2>&1; then
- tmp=`mktemp -t -- "$F.XXXXXX"` || exit 2
- else
- set -C
- tmp=${TMPDIR-/tmp}/$F.$$
- fi
- gzip -cdfq -- "$2" > "$tmp" || exit 2
- gzip_status=$(
- exec 4>&1
- (gzip -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- |
- eval "$cmp" - '"$tmp"' >&3
- )
+ *[-.]gz* | *[-.][zZ] | *.t[ga]z | -)
+ if test "$1$2" = --; then
+ gzip_status=$(
+ exec 4>&1
+ (gzip -cdfq - 4>&-; echo $? >&4) 3>&- |
+ eval "$cmp" - - >&3
+ )
+ elif
+ # Reject Solaris 8's buggy /bin/bash 2.03.
+ echo X |
+ (echo X | eval "$cmp" /dev/fd/5 - >/dev/null 2>&1) \
+ 5<&0
+ then
+ gzip_status=$(
+ exec 4>&1
+ (gzip -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- |
+ ( (gzip -cdfq -- "$2" 4>&-; echo $? >&4) 3>&- 5<&- </dev/null |
+ eval "$cmp" /dev/fd/5 - >&3) 5<&0
+ )
+ cmp_status=$?
+ case $gzip_status in
+ *[1-9]*) gzip_status=1;;
+ *) gzip_status=0;;
+ esac
+ (exit $cmp_status)
+ else
+ F=`expr "/$2" : '.*/\(.*\)[-.][zZtga]*$'` || F=$prog
+ tmp=
+ trap '
+ test -n "$tmp" && rm -f "$tmp"
+ (exit 2); exit 2
+ ' HUP INT PIPE TERM 0
+ if type mktemp >/dev/null 2>&1; then
+ tmp=`mktemp -t -- "$F.XXXXXX"` || exit 2
+ else
+ set -C
+ tmp=${TMPDIR-/tmp}/$F.$$
+ fi
+ gzip -cdfq -- "$2" > "$tmp" || exit 2
+ gzip_status=$(
+ exec 4>&1
+ (gzip -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- |
+ eval "$cmp" - '"$tmp"' >&3
+ )