diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-03 16:28:08 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-03 16:28:08 +0200 |
commit | e66cdc9ef77931bf63626a693459a2da833fc2e2 (patch) | |
tree | 492b37ca1cc301206b58efa5cbcc9c43f96246a1 /bin | |
parent | 2c10fda125bd547108ea9067594409df2cbeb4aa (diff) |
bin/pkg: pkg_doc: First test for perldoc, then doc/
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pkg | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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" } } |