Scripts: Ignore warnings from xz.
In practice this means making the scripts work when the input files have an unsupported check type which isn't a problem in practice unless support for some check types has been disabled at build time.
This commit is contained in:
parent
6552535afd
commit
d76c752a6d
|
@ -65,8 +65,9 @@ for file; do
|
||||||
test "X$file" = X- || <"$file" || exit 2
|
test "X$file" = X- || <"$file" || exit 2
|
||||||
done
|
done
|
||||||
|
|
||||||
xz1=$xz
|
# xz needs -qQ to ignore warnings like unsupported check type.
|
||||||
xz2=$xz
|
xz1="$xz -qQ"
|
||||||
|
xz2="$xz -qQ"
|
||||||
xz_status=0
|
xz_status=0
|
||||||
exec 3>&1
|
exec 3>&1
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ for i; do
|
||||||
*[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdf";;
|
*[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdf";;
|
||||||
*[-.]lzo | *[-.]tzo) uncompress="lzop -cdf";;
|
*[-.]lzo | *[-.]tzo) uncompress="lzop -cdf";;
|
||||||
*[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";; # zstd needs -q.
|
*[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";; # zstd needs -q.
|
||||||
*) uncompress="$xz -cdf";;
|
*) uncompress="$xz -cdfqQ";; # -qQ to ignore warnings like unsupp. check.
|
||||||
esac
|
esac
|
||||||
# xz_status will hold the decompressor's exit status.
|
# xz_status will hold the decompressor's exit status.
|
||||||
# Exit status of grep (and in rare cases, printf or sed) is
|
# Exit status of grep (and in rare cases, printf or sed) is
|
||||||
|
|
|
@ -50,9 +50,9 @@ fi
|
||||||
if test "$(less -V | { read _ ver _ && echo ${ver%%.*}; })" -ge 429; then
|
if test "$(less -V | { read _ ver _ && echo ${ver%%.*}; })" -ge 429; then
|
||||||
# less 429 or later: LESSOPEN pipe will be used on
|
# less 429 or later: LESSOPEN pipe will be used on
|
||||||
# standard input if $LESSOPEN begins with |-.
|
# standard input if $LESSOPEN begins with |-.
|
||||||
LESSOPEN="|-$xz -cdfq -- %s"
|
LESSOPEN="|-$xz -cdfqQ -- %s"
|
||||||
else
|
else
|
||||||
LESSOPEN="|$xz -cdfq -- %s"
|
LESSOPEN="|$xz -cdfqQ -- %s"
|
||||||
fi
|
fi
|
||||||
export LESSMETACHARS LESSOPEN
|
export LESSMETACHARS LESSOPEN
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ if test $# = 0; then
|
||||||
if test -t 0; then
|
if test -t 0; then
|
||||||
printf '%s\n' "$usage"; exit 1
|
printf '%s\n' "$usage"; exit 1
|
||||||
else
|
else
|
||||||
$xz -cdfq | eval "${PAGER:-more}"
|
$xz -cdfqQ | eval "${PAGER:-more}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
FIRST=1
|
FIRST=1
|
||||||
|
@ -70,7 +70,7 @@ else
|
||||||
fi
|
fi
|
||||||
if test "$ANS" != 's'; then
|
if test "$ANS" != 's'; then
|
||||||
printf '%s\n' "------> $FILE <------"
|
printf '%s\n' "------> $FILE <------"
|
||||||
$xz -cdfq -- "$FILE" | eval "${PAGER:-more}"
|
$xz -cdfqQ -- "$FILE" | eval "${PAGER:-more}"
|
||||||
fi
|
fi
|
||||||
if test -t 1; then
|
if test -t 1; then
|
||||||
FIRST=0
|
FIRST=0
|
||||||
|
|
Loading…
Reference in New Issue