summaryrefslogtreecommitdiffstats
path: root/src/scripts/xzgrep.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:34 +0000
commitcf178685aca107aa37c748de11da01562e78c46c (patch)
tree84d60b39c1744edcbdd4dbfc5026583914432dba /src/scripts/xzgrep.in
parentAdding upstream version 5.6.1+really5.4.5. (diff)
downloadxz-utils-upstream.tar.xz
xz-utils-upstream.zip
Adding upstream version 5.6.2.upstream/5.6.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/scripts/xzgrep.in')
-rw-r--r--src/scripts/xzgrep.in8
1 files changed, 5 insertions, 3 deletions
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 <charles@comm.polymtl.ca>
@@ -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