Adding upstream version 0.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
527d6bc346
commit
1bfa18df1d
22 changed files with 1234 additions and 125 deletions
58
zdiff.in
58
zdiff.in
|
@ -95,24 +95,15 @@ fi
|
|||
|
||||
if [ -z "${file2}" ]; then
|
||||
case "${file1}" in
|
||||
*.gz)
|
||||
file2=`printf "%s" "${file1}" | sed 's/.gz$//'` ;;
|
||||
*.tgz)
|
||||
file2=`printf "%s" "${file1}" | sed 's/tgz$/tar/'` ;;
|
||||
*.bz2)
|
||||
file2=`printf "%s" "${file1}" | sed 's/.bz2$//'` ;;
|
||||
*.tbz)
|
||||
file2=`printf "%s" "${file1}" | sed 's/tbz$/tar/'` ;;
|
||||
*.tbz2)
|
||||
file2=`printf "%s" "${file1}" | sed 's/tbz2$/tar/'` ;;
|
||||
*.lz)
|
||||
file2=`printf "%s" "${file1}" | sed 's/.lz$//'` ;;
|
||||
*.tlz)
|
||||
file2=`printf "%s" "${file1}" | sed 's/tlz$/tar/'` ;;
|
||||
*.xz)
|
||||
file2=`printf "%s" "${file1}" | sed 's/.xz$//'` ;;
|
||||
*.txz)
|
||||
file2=`printf "%s" "${file1}" | sed 's/txz$/tar/'` ;;
|
||||
*.gz) file2=`printf "%s" "${file1}" | sed -e 's,.gz$,,'` ;;
|
||||
*.tgz) file2=`printf "%s" "${file1}" | sed -e 's,tgz$,tar,'` ;;
|
||||
*.bz2) file2=`printf "%s" "${file1}" | sed -e 's,.bz2$,,'` ;;
|
||||
*.tbz) file2=`printf "%s" "${file1}" | sed -e 's,tbz$,tar,'` ;;
|
||||
*.tbz2) file2=`printf "%s" "${file1}" | sed -e 's,tbz2$,tar,'` ;;
|
||||
*.lz) file2=`printf "%s" "${file1}" | sed -e 's,.lz$,,'` ;;
|
||||
*.tlz) file2=`printf "%s" "${file1}" | sed -e 's,tlz$,tar,'` ;;
|
||||
*.xz) file2=`printf "%s" "${file1}" | sed -e 's,.xz$,,'` ;;
|
||||
*.txz) file2=`printf "%s" "${file1}" | sed -e 's,txz$,tar,'` ;;
|
||||
*)
|
||||
if [ -f "${file1}.gz" ]; then file2="${file1}.gz"
|
||||
elif [ -f "${file1}.bz2" ]; then file2="${file1}.bz2"
|
||||
|
@ -127,18 +118,25 @@ fi
|
|||
|
||||
prog1=
|
||||
prog2=
|
||||
case "${file1}" in
|
||||
*.gz | *.tgz) prog1=gzip ;;
|
||||
*.bz2 | *.tbz | *.tbz2) prog1=bzip2 ;;
|
||||
*.lz | *.tlz) prog1=lzip ;;
|
||||
*.xz | *.txz) prog1=xz ;;
|
||||
esac
|
||||
case "${file2}" in
|
||||
*.gz | *.tgz) prog2=gzip ;;
|
||||
*.bz2 | *.tbz | *.tbz2) prog2=bzip2 ;;
|
||||
*.lz | *.tlz) prog2=lzip ;;
|
||||
*.xz | *.txz) prog2=xz ;;
|
||||
esac
|
||||
bindir=`echo "$0" | sed -e 's,[^/]*$,,'`
|
||||
if [ -f "${file1}" ]; then
|
||||
prog_name=`"${bindir}"zutils -t -- "${file1}"`
|
||||
case "${prog_name}" in
|
||||
gzip) prog1=gzip ;;
|
||||
bzip2) prog1=bzip2 ;;
|
||||
lzip) prog1=lzip ;;
|
||||
xz) prog1=xz ;;
|
||||
esac
|
||||
fi
|
||||
if [ -f "${file2}" ]; then
|
||||
prog_name=`"${bindir}"zutils -t -- "${file2}"`
|
||||
case "${prog_name}" in
|
||||
gzip) prog2=gzip ;;
|
||||
bzip2) prog2=bzip2 ;;
|
||||
lzip) prog2=lzip ;;
|
||||
xz) prog2=xz ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
retval=0
|
||||
if [ -n "${prog1}" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue