summaryrefslogtreecommitdiffstats
path: root/src/scripts/xzgrep.in
diff options
context:
space:
mode:
Diffstat (limited to '')
-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