summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-03-16 13:01:51 +0000
committerMike Frysinger <vapier@gentoo.org>2008-03-16 13:01:51 +0000
commit0d0b7e5e96be9ef81084a8b964fb555c7429b949 (patch)
tree8eac302d87c263e1c61d1a75d569ec351ff46b3d /sys-apps/less
parentold (diff)
downloadhistorical-0d0b7e5e96be9ef81084a8b964fb555c7429b949.tar.gz
historical-0d0b7e5e96be9ef81084a8b964fb555c7429b949.tar.bz2
historical-0d0b7e5e96be9ef81084a8b964fb555c7429b949.zip
Add case for shell scripts for file output #213565 by Matthias B.
Package-Manager: portage-2.2_pre2
Diffstat (limited to 'sys-apps/less')
-rw-r--r--sys-apps/less/ChangeLog5
-rw-r--r--sys-apps/less/Manifest18
-rw-r--r--sys-apps/less/files/lesspipe.sh28
3 files changed, 25 insertions, 26 deletions
diff --git a/sys-apps/less/ChangeLog b/sys-apps/less/ChangeLog
index e5ca736cad97..e038cc72fc8e 100644
--- a/sys-apps/less/ChangeLog
+++ b/sys-apps/less/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-apps/less
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/less/ChangeLog,v 1.92 2008/02/21 00:55:25 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/less/ChangeLog,v 1.93 2008/03/16 13:01:51 vapier Exp $
+
+ 16 Mar 2008; Mike Frysinger <vapier@gentoo.org> files/lesspipe.sh:
+ Add case for shell scripts for file output #213565 by Matthias B.
21 Feb 2008; Brent Baude <ranger@gentoo.org> less-418.ebuild:
stable ppc64, bug 210725
diff --git a/sys-apps/less/Manifest b/sys-apps/less/Manifest
index afd56b06868a..6c7bae41c044 100644
--- a/sys-apps/less/Manifest
+++ b/sys-apps/less/Manifest
@@ -4,26 +4,18 @@ Hash: SHA1
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 5915 RMD160 63408e2370f6bb4ad67caf7861ac024a006d9a12 SHA1 367c9fbfcc675fa76e2dda8dbc448e9d9f6d9c42 SHA256 11f0d505b7c7fb508ebe6fcaadd17689200a10645a3602bd9fb9d2ac1495fb93
+AUX lesspipe.sh 5959 RMD160 e7031f061a9077b18445c050843aa812fde7b6da SHA1 9cec824c7d6404a7ce8bd361b2ed77e2a7e128b3 SHA256 1575928df512965ac4c7befb902b2ed07d548e96bd1d6346b77a0788524bc1bb
DIST code2color 199875 RMD160 378d340a20c3fe500f19116220d54816fe279225 SHA1 b30526dd52c747b8bd6dcf53cf5cc94824c47feb SHA256 ce63f148293a81b0fe5e072f33285f9bf4f1d832f64b23a2220519674a47091d
-DIST less-406.tar.gz 291349 RMD160 db62576ba6976cc1efe17680b6a6da5237dba425 SHA1 7aeab848682c3ac7cd9ba54e4c96199f9fdf25e5 SHA256 5cb93fa75cce38f472ac91503bdd56c601037551cda3f999447773dfa1279130
-DIST less-408.tar.gz 291963 RMD160 1548cb1a8bfe306264aed929ee4aaad950748945 SHA1 63fe61587fb90b23cbfd47155d06b9bc49fc0716 SHA256 a1e325a0e38a672e2b8f5667436b6f84bb48eddb2836ea08a514013adc69940d
-DIST less-409.tar.gz 292013 RMD160 67d13fef7435a298f48f03d10bbc249642ad17ad SHA1 6c554f520b635d783e16f19bfb3d7d00176a8a2d SHA256 5cf724149ecd484a084d8c8322a6c3108cebe576d7018accf6ee7bd6f3f5142f
-DIST less-415.tar.gz 294361 RMD160 c6a910a1fbd218dd496ae47c68f98778dd4023e2 SHA1 49fb7f3c2105c98c4a7c062cddadb20f21e39ffd SHA256 9c0a421ab3da3aed0be9aba46832c7eb8337a7e7689f7729a1a93012f549079a
DIST less-416.tar.gz 294541 RMD160 0f605bd4105aa94f62eddd0316f88c5d6a15bac6 SHA1 8f22bfb8eab70e21c7918ed0a5e61b9833c7d19e SHA256 9b46579741b089e4b148a6e19f7bfdc26afd02ccbf85105fc8314e8c3fb355db
DIST less-418.tar.gz 299213 RMD160 a10402aa423e3d3c4d950735208991d7d4afb85d SHA1 ec4fb48680878a7ac3499c46564c47c448b0aa22 SHA256 f532fcd61b012379d3258196a8588fd9d51ecdfb5c795485ab2f78d439b103b4
-EBUILD less-406.ebuild 1201 RMD160 7ef7c6ae9cbecb32a8004728ea877cb0e520ec98 SHA1 0065a855f86f3f8d592e0370485bf227c2e03eaa SHA256 d82b8b7fe5aa69f32d27a53fe20456bf18affd2ceae9371991722a8ec31b2254
-EBUILD less-408.ebuild 1217 RMD160 a0d2370d7a0de5b85fab5706b76c6c095ccd4ddc SHA1 956d1c0de9789e032e81b75db9ba55299be6b28c SHA256 730eea88e7277a2637687f58e22d2b6cbcdce8b10bc6e2f2b2bddb4b548e9d78
-EBUILD less-409.ebuild 1204 RMD160 4ab7d1c333e8dd54e4442023d2d222988885ab56 SHA1 1c3ab3735ff20bddd4d7c120fe63cf20ff723e76 SHA256 44074756a0528ceac21bb311624cb274059a41701b10902fa4fc2261bee77eb8
-EBUILD less-415.ebuild 1217 RMD160 4f846c8b33e89e98ebc9b862095359baa31ffdc6 SHA1 18fd3e85b257c3c25b21d7e27539d5eea0d2553e SHA256 a2b21f3683b57be662a64b1a7b00ffbbddcd592e2d2be8230a68bb50ae24a6da
EBUILD less-416.ebuild 1207 RMD160 36ee59a43471cf2deb5b582b22f4f2d0cd083e07 SHA1 432f66d7e64e1f8012cbf536f080f9e5c507df0b SHA256 8beca543fa96e68a7ac51758ef5c0eae728aa5240a4b0d2ac7f615ee96b5f2fb
EBUILD less-418.ebuild 1205 RMD160 60cce7c599cb7bab423f5388ac21ca7f21d6ab80 SHA1 e9c796523ea60cd8d8b01fbb10924227d0b7970b SHA256 ea2ab0ab2b832608a0c96bc8277c9091935484e0f7954b1a3ae4721513e7666f
-MISC ChangeLog 10979 RMD160 e7720f931418452f43a82e8670c6011b946a98cc SHA1 53951af780607cbf8a6b2d5bf195067e3a9a796f SHA256 f0ff8db0cc2e79fc520f6b92db692a2624c5e2e661d93b6bf833eccf37444e86
+MISC ChangeLog 11117 RMD160 29a601a62f9978d50fece3184cc0f6ec671828b8 SHA1 86815bae673ba00ddc1096688fedf3f0d9e9ffa5 SHA256 8eb28e8e4029037f4b91639195db7d2bc79d5308e165f4f23a9a047bdf4cb545
MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
-iD8DBQFH3NFpj9hvisErhMIRAihIAJ9Ern16z8nPvAQe8dW+h2eQ2niZjgCcCmeJ
-HfY738NbSfutzb3PYStwsYY=
-=y3me
+iD8DBQFH3RqMj9hvisErhMIRAmHSAKDWtP4xn3aZTkZ8d9912AmPCzJ72wCg6Rt+
+NVP2lBAkWS5GlX8OMUt8NIw=
+=K0K7
-----END PGP SIGNATURE-----
diff --git a/sys-apps/less/files/lesspipe.sh b/sys-apps/less/files/lesspipe.sh
index da80eed77264..c399c50b4113 100644
--- a/sys-apps/less/files/lesspipe.sh
+++ b/sys-apps/less/files/lesspipe.sh
@@ -19,19 +19,22 @@ guesscompress() {
lesspipe_file() {
local out=$(file -L -- "$1")
+ local suffix
case ${out} in
- *" ar archive"*) lesspipe "$1" ".a" ;;
- *" tar archive"*) lesspipe "$1" ".tar" ;;
- *" CAB-Installer"*) lesspipe "$1" ".cab" ;;
- *" troff "*) lesspipe "$1" ".man" ;;
- *" shared object"*) lesspipe "$1" ".so" ;;
- *" Zip archive"*) lesspipe "$1" ".zip" ;;
- *" LHa"*archive*) lesspipe "$1" ".lha" ;;
- *" cpio archive"*) lesspipe "$1" ".cpio" ;;
- *" ELF "*) readelf -a -- "$1" ;;
- *": data") hexdump -C -- "$1" ;;
- *) return 1 ;;
+ *" ar archive"*) suffix="a";;
+ *" CAB-Installer"*) suffix="cab";;
+ *" cpio archive"*) suffix="cpio";;
+ *" ELF "*) suffix="elf";;
+ *" LHa"*archive*) suffix="lha";;
+ *" troff "*) suffix="man";;
+ *" script text"*) suffix="sh";;
+ *" shared object"*) suffix="so";;
+ *" tar archive"*) suffix="tar";;
+ *" Zip archive"*) suffix="zip";;
+ *": data") hexdump -C -- "$1"; return 0;;
+ *) return 1;;
esac
+ lesspipe "$1" ".${suffix}"
return 0
}
@@ -105,6 +108,7 @@ lesspipe() {
*.zoo) zoo -list "$1" ;;
*.7z) 7z l -- "$1" ;;
*.a) ar tv "$1" ;;
+ *.elf) readelf -a -- "$1" ;;
*.so) readelf -h -d -s -- "$1" ;;
*.mo|*.gmo) msgunfmt -- "$1" ;;
@@ -199,7 +203,7 @@ if [[ -z $1 ]] ; then
echo "Usage: lesspipe.sh <file>"
elif [[ $1 == "-V" ]] ; then
Id="cvsid"
- cvsid="$Id: lesspipe.sh,v 1.26 2007/11/06 02:19:29 vapier Exp $"
+ cvsid="$Id: lesspipe.sh,v 1.27 2008/03/16 13:01:51 vapier Exp $"
cat <<-EOF
$cvsid
Copyright 2001-2006 Gentoo Foundation