diff --git a/less.spec b/less.spec index 52c708931cbab58981c5b427dcac37ba490e8132..cca0d14ec052181675602e76bf9d3c74f75221d5 100644 --- a/less.spec +++ b/less.spec @@ -1,6 +1,6 @@ Name: less Version: 661 -Release: 1 +Release: 2 Summary: Less is a pager that displays text files. License: GPL-3.0-only and BSD-2-Clause URL: http://www.greenwoodsoftware.com/less @@ -51,6 +51,9 @@ install -p -m 644 %{S:3} %{buildroot}%{_sysconfdir}/profile.d %{_mandir}/man1/* %changelog +* Wed Aug 14 2024 Funda Wang - 661-2 +- do not use bashisms in lesspipe.sh + * Sun Jul 14 2024 Funda Wang - 661-1 - Update to 661 - add lesspipe as most other distros do diff --git a/lesspipe.sh b/lesspipe.sh index f2df6a1fe4904b22fac1228407f9fe126e1180aa..71b75c7a1109c7f5cb8ef0767ba98679f8ec4766 100644 --- a/lesspipe.sh +++ b/lesspipe.sh @@ -63,12 +63,16 @@ case "$1" in if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then $DECOMPRESSOR -- "$1" | manfilter - exit $? - fi ;;& + fi +esac +case "$1" in *.[1-9n]|*.[1-9]x|*.man) if file "$1" | grep -q troff; then manfilter "$1" exit $? - fi ;;& + fi +esac +case "$1" in *.tar) tar tvvf "$1"; exit $? ;; *.tgz|*.tar.gz|*.tar.[zZ]) tar tzvvf "$1"; exit $? ;; *.tar.xz) tar Jtvvf "$1"; exit $? ;;