diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-02-05 06:36:59 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-02-05 06:36:59 +0000 |
commit | 9b0c037a71d2247ee1539dd224ed12860f062271 (patch) | |
tree | 725bbf7d84fb919f5215f84fa27fdd602717253e /sys-apps/less | |
parent | Version bump. (diff) | |
download | historical-9b0c037a71d2247ee1539dd224ed12860f062271.tar.gz historical-9b0c037a71d2247ee1539dd224ed12860f062271.tar.bz2 historical-9b0c037a71d2247ee1539dd224ed12860f062271.zip |
Fix handling of short tarball names #303433 by Mike Williams, and add a LESSDEBUG helper.
Package-Manager: portage-2.2_rc61/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/less')
-rw-r--r-- | sys-apps/less/ChangeLog | 6 | ||||
-rw-r--r-- | sys-apps/less/Manifest | 14 | ||||
-rw-r--r-- | sys-apps/less/files/lesspipe.sh | 25 |
3 files changed, 27 insertions, 18 deletions
diff --git a/sys-apps/less/ChangeLog b/sys-apps/less/ChangeLog index 6ec336c9c129..bfdd552c5079 100644 --- a/sys-apps/less/ChangeLog +++ b/sys-apps/less/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/less # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/less/ChangeLog,v 1.114 2010/01/10 17:47:11 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/less/ChangeLog,v 1.115 2010/02/05 06:36:58 vapier Exp $ + + 05 Feb 2010; Mike Frysinger <vapier@gentoo.org> files/lesspipe.sh: + Fix handling of short tarball names #303433 by Mike Williams, and add a + LESSDEBUG helper. 10 Jan 2010; Ulrich Mueller <ulm@gentoo.org> less-436.ebuild: Fix LICENSE, less is the same as BSD-2. diff --git a/sys-apps/less/Manifest b/sys-apps/less/Manifest index 59efa6d924fe..7eaef66f63ad 100644 --- a/sys-apps/less/Manifest +++ b/sys-apps/less/Manifest @@ -1,19 +1,19 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 +Hash: SHA256 AUX README.Gentoo 823 RMD160 be59c37906fca17fa25f6781d3f5e7abc114dc57 SHA1 5a1f126af728f5220b97623050e2f9b1ea5ae58e SHA256 3985fd1810f660ea1c1f2732f719b069b6934d62d8d9e8a09287e63f049ba27d AUX code2color.patch 1110 RMD160 712f7b79c94f92ee62825d5f53627f18fae693d2 SHA1 a82f937f3a923b52adc4f14cfc9b641903884839 SHA256 a3887126826ef0b4b821bd97cf4e7abfc8b1c9280bf2bb18a2a4cec9a2973936 AUX less.envd 50 RMD160 e9d7b2497aa81e13b740dc765c0fc87d4f1f2f8e SHA1 f903d459e7f0b2c14009304bebb7a045a7cccf9d SHA256 1f186ac4f500c842a9016702b3d7e9d69fe161db23cf56c316ed7f5a51da6a4e -AUX lesspipe.sh 7048 RMD160 29baa05c86fc700b6b23a7858f61c9a1639766d0 SHA1 150e512336ba1c8fdb969f701da40948a173939e SHA256 724bea7025997623922861cc061b263947cb8cabd1d9b42fa0425ead4fcd46d9 +AUX lesspipe.sh 7186 RMD160 46d1d0985bd0576615168fddfe2725997a5b0f31 SHA1 d130ddbdb41cadf98ea8c03b391d25cb07ea70f8 SHA256 a941abb627bcab8ac7eff55c0471f5b412eace5d1796bef53a80b42dd3327322 DIST code2color 199875 RMD160 378d340a20c3fe500f19116220d54816fe279225 SHA1 b30526dd52c747b8bd6dcf53cf5cc94824c47feb SHA256 ce63f148293a81b0fe5e072f33285f9bf4f1d832f64b23a2220519674a47091d DIST less-436.tar.gz 303921 RMD160 b186b76fcdbf38056b32fbc1b54877dccf64a8ec SHA1 f78998a1a79a7e1962c901dd41bdc3d1c2005471 SHA256 57a16ff07431a9af45cf1cd5b374e1066d019304219f0d156e22bb8c4d6734d2 EBUILD less-436.ebuild 1180 RMD160 2373d15299cbebf418ac563389eeb0f43e39f118 SHA1 bfbae856a37812f1afe5ebc7ca98106c3bf1c90d SHA256 68082acf148fdfab071384a442f7f68232680b7abf6e0328ccb16b640e612397 -MISC ChangeLog 13361 RMD160 5568e5c5db7448de7d3c8864c6772668ba6944d1 SHA1 108bb66ac44797e06c04c3f0b57aa0fb31a50f85 SHA256 a289c15dba734271e6f388b01b99c3e81a7054b20a8ee8e9e6f07b884fc8fbf2 +MISC ChangeLog 13528 RMD160 01332cdc082ce08d67fa595d83220580e7cf1670 SHA1 a992c6cf3b8139291bd9cac9b320481c79ea5e2e SHA256 061920934f7307cc40ae5bdf742679873cf294e89b0f5e9cbad53f0d0f2ad2e0 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.10 (GNU/Linux) +Version: GnuPG v2.0.14 (GNU/Linux) -iEYEARECAAYFAktKE0QACgkQOeoy/oIi7uwlfgCg2gVBpJ97HeWp3Xh+JwXNtVOR -j/EAoLbvzH+9S/adlF4xNP9gD0pH3wcg -=1QGh +iF4EAREIAAYFAktrvL4ACgkQTwhj9JtAlp5VnQD+OAkWdeT8TWJJM4Cj8TWbiQAM +DqgcU5Sl0y5TlH3blhQA/3YsiHDn6iga1evafx1fL/0fdX7aniCLtHe5IMpgTCOW +=mQw6 -----END PGP SIGNATURE----- diff --git a/sys-apps/less/files/lesspipe.sh b/sys-apps/less/files/lesspipe.sh index e7daac462b22..0a0f6556a8a5 100644 --- a/sys-apps/less/files/lesspipe.sh +++ b/sys-apps/less/files/lesspipe.sh @@ -5,16 +5,18 @@ # TODO: handle compressed files better +[[ -n ${LESSDEBUG} ]] && set -x + trap 'exit 0' PIPE guesscompress() { case "$1" in - *.gz|*.z) echo "gunzip -c" ;; - *.bz2) echo "bunzip2 -c" ;; - *.lz) echo "lzip -c" ;; - *.lzma) echo "unlzma -c" ;; - *.xz) echo "xzdec" ;; - *) echo "cat" ;; + *.gz|*.z) echo "gunzip -c" ;; + *.bz2|*.bz) echo "bunzip2 -c" ;; + *.lz) echo "lzip -c" ;; + *.lzma) echo "unlzma -c" ;; + *.xz) echo "xzdec" ;; + *) echo "cat" ;; esac } @@ -101,11 +103,12 @@ lesspipe() { ### Tar files ### *.tar|\ - *.tar.bz2|*.tbz2|*.tbz|\ - *.tar.gz|*.tgz|*.tar.z|\ + *.tar.bz2|*.tar.gz|*.tar.z|\ *.tar.lz|*.tar.tlz|\ *.tar.lzma|*.tar.xz) ${DECOMPRESSOR} -- "$1" | tar tvvf -;; + *.tbz2|*.tbz|*.tgz|*.tlz) + lesspipe "$1" "$1".tar.${1##*.t} ;; ### Misc archives ### *.bz2|\ @@ -232,7 +235,7 @@ if [[ -z $1 ]] ; then echo "Usage: lesspipe.sh <file>" elif [[ $1 == "-V" || $1 == "--version" ]] ; then Id="cvsid" - cvsid="$Id: lesspipe.sh,v 1.36 2009/10/22 07:53:42 vapier Exp $" + cvsid="$Id: lesspipe.sh,v 1.37 2010/02/05 06:36:59 vapier Exp $" cat <<-EOF $cvsid Copyright 2001-2009 Gentoo Foundation @@ -266,5 +269,7 @@ elif [[ -d $1 ]] ; then ls -alF -- "$1" else recur=0 - lesspipe "$1" 2> /dev/null + [[ -n ${LESSDEBUG} ]] \ + && lesspipe "$1" \ + || lesspipe "$1" 2> /dev/null fi |