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
|
Summary: A text file browser similar to more, but better
|
||||||
Name: less
|
Name: less
|
||||||
Version: 436
|
Version: 436
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Applications/Text
|
Group: Applications/Text
|
||||||
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
|
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
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%changelog
|
%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
|
* Mon Jan 4 2010 Nikola Pajkovsky <npajkovs@redhat.com> - 436-5
|
||||||
- patched wrong manpage. Resolves: #537746.
|
- patched wrong manpage. Resolves: #537746.
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
lesspipe() {
|
lesspipe() {
|
||||||
case "$1" in
|
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
|
case "$1" in
|
||||||
*.gz) DECOMPRESSOR="gunzip -c" ;;
|
*.gz) DECOMPRESSOR="gunzip -c" ;;
|
||||||
*.bz2) DECOMPRESSOR="bunzip2 -c" ;;
|
*.bz2) DECOMPRESSOR="bunzip2 -c" ;;
|
||||||
@ -22,6 +22,8 @@ lesspipe() {
|
|||||||
fi ;;
|
fi ;;
|
||||||
*.tar) tar tvvf "$1" ;;
|
*.tar) tar tvvf "$1" ;;
|
||||||
*.tgz|*.tar.gz|*.tar.[zZ]) tar tzvvf "$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 - ;;
|
*.tar.bz2|*.tbz2) bzip2 -dc -- "$1" | tar tvvf - ;;
|
||||||
*.[zZ]|*.gz) gzip -dc -- "$1" ;;
|
*.[zZ]|*.gz) gzip -dc -- "$1" ;;
|
||||||
*.bz2) bzip2 -dc -- "$1" ;;
|
*.bz2) bzip2 -dc -- "$1" ;;
|
||||||
@ -42,6 +44,7 @@ lesspipe() {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
*.gz) DECOMPRESSOR="gunzip -c" ;;
|
*.gz) DECOMPRESSOR="gunzip -c" ;;
|
||||||
*.bz2) DECOMPRESSOR="bunzip2 -c" ;;
|
*.bz2) DECOMPRESSOR="bunzip2 -c" ;;
|
||||||
|
*.xz) DECOMPRESSOR="unxz -c" ;;
|
||||||
esac
|
esac
|
||||||
if [ ! -z $DECOMPRESSOR ] ; then
|
if [ ! -z $DECOMPRESSOR ] ; then
|
||||||
$DECOMPRESSOR -- "$1" ;
|
$DECOMPRESSOR -- "$1" ;
|
||||||
|
Loading…
Reference in New Issue
Block a user