From cf178685aca107aa37c748de11da01562e78c46c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 15 Jun 2024 11:41:34 +0200 Subject: Adding upstream version 5.6.2. Signed-off-by: Daniel Baumann --- src/scripts/xzgrep.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/scripts/xzgrep.in') diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in index 490e47d..c9cd02d 100644 --- a/src/scripts/xzgrep.in +++ b/src/scripts/xzgrep.in @@ -1,4 +1,5 @@ #!@POSIX_SHELL@ +# SPDX-License-Identifier: GPL-2.0-or-later # xzgrep -- a wrapper around a grep program that decompresses files as needed # Adapted from a version sent by Charles Levert @@ -34,7 +35,7 @@ case ${0##*/} in *) prog=xzgrep; grep=${GREP:-grep};; esac -version="$prog (@PACKAGE_NAME@) @VERSION@" +version="$prog (@PACKAGE_NAME@) @PACKAGE_VERSION@" usage="Usage: ${0##*/} [OPTION]... [-e] PATTERN [FILE]... Look for instances of PATTERN in the input FILEs, using their @@ -156,7 +157,7 @@ done eval "set -- $operands "'${1+"$@"}' if test $have_pat -eq 0; then - case ${1?"Missing pattern; try \`${0##*/} --help' for help"} in + case ${1?"Missing pattern; try '${0##*/} --help' for help"} in (*\'*) grep="$grep -e '"$(printf '%sX\n' "$1" | LC_ALL=C sed "$escape");; (*) @@ -180,6 +181,7 @@ for i; do *[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdf";; *[-.]lzo | *[-.]tzo) uncompress="lzop -cdf";; *[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";; # zstd needs -q. + *[-.]lz4) uncompress="lz4 -cdf";; *) uncompress="$xz -cdfqQ";; # -qQ to ignore warnings like unsupp. check. esac # xz_status will hold the decompressor's exit status. @@ -275,7 +277,7 @@ for i; do test "$(kill -l "$xz_status" 2> /dev/null)" != "PIPE" && exit "$xz_status" elif test "$xz_status" -gt 0; then # Decompression failed but we will continue with the remaining - # files anwyway. Set exit status to at least 2 to indicate an error. + # files anyway. Set exit status to at least 2 to indicate an error. test "$r" -lt 2 && r=2 fi -- cgit v1.2.3