RFE: lesspipe.sh could use a support for *.xz file
This commit is contained in:
parent
2866b77f8b
commit
13e0c85106
@ -1,7 +1,7 @@
|
||||
Summary: A text file browser similar to more, but better
|
||||
Name: less
|
||||
Version: 436
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/Text
|
||||
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
|
||||
@ -65,6 +65,9 @@ ls -la $RPM_BUILD_ROOT/etc/profile.d
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
* Wed Jan 20 2010 Nikola Pajkovsky <npajkovs@redhat.com> - 436-6
|
||||
- RFE: lesspipe.sh could use a support for *.xz file
|
||||
|
||||
* Mon Jan 4 2010 Nikola Pajkovsky <npajkovs@redhat.com> - 436-5
|
||||
- patched wrong manpage. Resolves: #537746.
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
lesspipe() {
|
||||
case "$1" in
|
||||
*.[1-9n]|*.man|*.[1-9n].bz2|*.man.bz2|*.[1-9].gz|*.[1-9]x.gz|*.[1-9].man.gz)
|
||||
*.[1-9n]|*.man|*.[1-9n].bz2|*.man.bz2|*.[1-9].gz|*.[1-9]x.gz|*.man.gz|*.[1-9].xz|*.[1-9]x.xz|*.man.xz)
|
||||
case "$1" in
|
||||
*.gz) DECOMPRESSOR="gunzip -c" ;;
|
||||
*.bz2) DECOMPRESSOR="bunzip2 -c" ;;
|
||||
@ -22,6 +22,8 @@ lesspipe() {
|
||||
fi ;;
|
||||
*.tar) tar tvvf "$1" ;;
|
||||
*.tgz|*.tar.gz|*.tar.[zZ]) tar tzvvf "$1" ;;
|
||||
*.tar.xz) tar Jtvvf "$1" ;;
|
||||
*.xz) xz -dc -- "$1" ;;
|
||||
*.tar.bz2|*.tbz2) bzip2 -dc -- "$1" | tar tvvf - ;;
|
||||
*.[zZ]|*.gz) gzip -dc -- "$1" ;;
|
||||
*.bz2) bzip2 -dc -- "$1" ;;
|
||||
@ -42,6 +44,7 @@ lesspipe() {
|
||||
case "$1" in
|
||||
*.gz) DECOMPRESSOR="gunzip -c" ;;
|
||||
*.bz2) DECOMPRESSOR="bunzip2 -c" ;;
|
||||
*.xz) DECOMPRESSOR="unxz -c" ;;
|
||||
esac
|
||||
if [ ! -z $DECOMPRESSOR ] ; then
|
||||
$DECOMPRESSOR -- "$1" ;
|
||||
|
Loading…
Reference in New Issue
Block a user