Scripts: Fix gzip and bzip2 support in xzdiff.

This commit is contained in:
Lasse Collin 2010-12-13 16:36:33 +02:00
parent 9311774c49
commit 316cbe2446
1 changed files with 6 additions and 6 deletions

View File

@ -74,9 +74,9 @@ if test $# -eq 1; then
*[-.]xz | *[-.]lzma | *.t[lx]z) *[-.]xz | *[-.]lzma | *.t[lx]z)
;; ;;
*[-.]bz2 | *.tbz | *.tbz2) *[-.]bz2 | *.tbz | *.tbz2)
xz1=$bzip2;; xz1=bzip2;;
*[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z)
xz1=$gzip;; xz1=gzip;;
*) *)
echo >&2 "$0: $1: Unknown compressed file name suffix" echo >&2 "$0: $1: Unknown compressed file name suffix"
exit 2;; exit 2;;
@ -95,12 +95,12 @@ if test $# -eq 1; then
) )
elif test $# -eq 2; then elif test $# -eq 2; then
case $1 in case $1 in
*[-.]bz2 | *.tbz | *.tbz2) xz1=$bzip2;; *[-.]bz2 | *.tbz | *.tbz2) xz1=bzip2;;
*[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz1=$gzip;; *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz1=gzip;;
esac esac
case $2 in case $2 in
*[-.]bz2 | *.tbz | *.tbz2) xz2=$bzip2;; *[-.]bz2 | *.tbz | *.tbz2) xz2=bzip2;;
*[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz2=$gzip;; *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz2=gzip;;
esac esac
case $1 in case $1 in
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | -) *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | -)