summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkg10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/pkg b/bin/pkg
index e449973..7df34d1 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -296,13 +296,15 @@ pkg_changelog () {
}
pkg_doc () {
- # FIXME this sucks
- if ([ -r $PDIR/*/doc/$1 ]) {
- less $PDIR/*/doc/$1
- } elif ([ -x $PDIR/*/bin/$1 ]) {
+ # FIXME this globbing sucks
+ if ([ -x $PDIR/*/bin/$1 ]) {
if (file $PDIR/*/bin/$1 | grep 'perl script text executable' &> /dev/null) {
perldoc $PDIR/*/bin/$1
}
+ } elif ([ -r $PDIR/*/doc/$1 ]) {
+ less $PDIR/*/doc/$1
+ } else {
+ echo "No documentation found"
}
}