summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-06-02 17:46:03 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-06-02 17:46:03 +0200
commit23ad6e0322b0b6b9e1d88b8a2db208312840ff68 (patch)
tree436fb419cf7048144c7a1778719a409765facf9c /bin/pkg
parente5351777aaa154e4f4bfb7af67ca8786b150bde2 (diff)
bin/pkg: pkg_doc: Check for perldoc
Diffstat (limited to 'bin/pkg')
-rwxr-xr-xbin/pkg8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/pkg b/bin/pkg
index 7afe3e6..e449973 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -297,7 +297,13 @@ pkg_changelog () {
pkg_doc () {
# FIXME this sucks
- [ -r $PDIR/*/doc/$1 ] && less $PDIR/*/doc/$1
+ if ([ -r $PDIR/*/doc/$1 ]) {
+ less $PDIR/*/doc/$1
+ } elif ([ -x $PDIR/*/bin/$1 ]) {
+ if (file $PDIR/*/bin/$1 | grep 'perl script text executable' &> /dev/null) {
+ perldoc $PDIR/*/bin/$1
+ }
+ }
}
check_sed