xz/xz-5.1.2alpha-less-version-check.patch
Pavel Raiskup c7e91236f6 xzless: better check the less version
Resolves: #1015924
Version: 5.1.2-8alpha
2014-04-02 10:20:22 +02:00

14 lines
547 B
Diff

diff --git a/src/scripts/xzless.in b/src/scripts/xzless.in
index a3da697..288dd87 100644
--- a/src/scripts/xzless.in
+++ b/src/scripts/xzless.in
@@ -46,7 +46,7 @@ if test "${LESSMETACHARS+set}" != set; then
LESSMETACHARS="$space$tab$nl'"';*?"()<>[|&^`#\$%=~'
fi
-if test "$(less -V | { read ver && echo ${ver#less }; })" -ge 429; then
+if test "$(less -V | { read less ver re && echo ${ver}; })" -ge 429; then
# less 429 or later: LESSOPEN pipe will be used on
# standard input if $LESSOPEN begins with |-.
LESSOPEN="|-$xz -cdfq -- %s"