From 3c7860cf49de6f81046b3a4034a89f3a4803a576 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Fri, 11 Nov 2022 13:16:21 +0200 Subject: xzdiff: Add support for .lz files. The other scripts don't need changes for .lz support because in those scripts it is enough that xz supports .lz. --- src/scripts/xzdiff.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scripts/xzdiff.in b/src/scripts/xzdiff.in index 389921d8..c17d78b2 100644 --- a/src/scripts/xzdiff.in +++ b/src/scripts/xzdiff.in @@ -73,7 +73,7 @@ exec 3>&1 if test $# -eq 1; then case $1 in - *[-.]xz | *[-.]lzma | *.t[lx]z) + *[-.]xz | *[-.]lzma | *[-.]lz | *.t[lx]z) ;; *[-.]bz2 | *.tbz | *.tbz2) xz1=bzip2;; @@ -88,7 +88,7 @@ if test $# -eq 1; then exit 2;; esac case $1 in - *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lzo | *[-.]zst) + *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *[-.]lzo | *[-.]zst) FILE=`expr "X$1" : 'X\(.*\)[-.][abglmostxzZ2]*$'`;; *.t[abglx]z) FILE=`expr "X$1" : 'X\(.*[-.]t\)[abglx]z$'`ar;; @@ -117,9 +117,9 @@ elif test $# -eq 2; then *[-.]zst | *.tzst) xz2='zstd -q';; esac case $1 in - *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -) + *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -) case "$2" in - *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -) + *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -) if test "$1$2" = --; then xz_status=$( exec 4>&1 @@ -183,7 +183,7 @@ elif test $# -eq 2; then esac;; *) case "$2" in - *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -) + *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -) xz_status=$( exec 4>&1 ($xz2 -cdf -- "$2" 4>&-; echo $? >&4) 3>&- | -- cgit v1.2.3