summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/pkg9
-rw-r--r--hooks/post-update5
2 files changed, 5 insertions, 9 deletions
diff --git a/bin/pkg b/bin/pkg
index 514da64..95e2488 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -311,11 +311,10 @@ pkg_changelog () {
}
pkg_doc () {
- # FIXME this globbing sucks
- 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
+ if ([ -r $PDIR/.collected/man/$1 ]) {
+ man $PDIR/.collected/man/$1
+ } elif ([ -r $PDIR/.collected/doc/$1 ]) {
+ less $PDIR/.collected/doc/$1
} else {
echo "No documentation found"
}
diff --git a/hooks/post-update b/hooks/post-update
index 2f9dcec..7be98d2 100644
--- a/hooks/post-update
+++ b/hooks/post-update
@@ -1,4 +1 @@
-rmdir $PDIR/.links/{bin,doc,man,etc,include}
-rmdir $PDIR/.links
-mkdir $PDIR/.collected
-mkdir $PDIR/.collected/{bin,doc,man,etc,include}
+mkdir -p $PDIR/.collected/{bin,doc,man,etc,include}