summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/pkg17
-rw-r--r--hooks/post-update7
2 files changed, 20 insertions, 4 deletions
diff --git a/bin/pkg b/bin/pkg
index de3a31c..514da64 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -108,6 +108,20 @@ check_deps () {
}
}
+create_docs () {
+ cd $PDIR/$1
+ if ([ -d docs ]) {
+ cp docs/* $PDIR/.collected/doc/
+ }
+ if ([ -d bin ]) {
+ for i in bin; {
+ if (podchecker bin/$i &> /dev/null) {
+ pod2man bin/$i > $PDIR/.collected/man/$i
+ }
+ }
+ }
+}
+
pkg_add () {
if ([ -d $PDIR/$1 ]) {
info "Package '$1' is already installed!\n"
@@ -126,9 +140,9 @@ pkg_add () {
. $PDIR/$1/hooks/post-add
}
check_deps "$1"
- info 'Checking symlinks...\n'
cd $PDIR/$1
checklinks $CL_OPTIONS
+ create_docs "$1"
return 0
}
@@ -166,6 +180,7 @@ pkg_update () {
. hooks/post-update
}
checklinks $CL_OPTIONS
+ create_docs "$1"
} else {
info "\r \r"
}
diff --git a/hooks/post-update b/hooks/post-update
index 3369111..2f9dcec 100644
--- a/hooks/post-update
+++ b/hooks/post-update
@@ -1,3 +1,4 @@
-mkdir $PDIR/.links
-mkdir $PDIR/.links/{bin,doc,man,etc,include}
-
+rmdir $PDIR/.links/{bin,doc,man,etc,include}
+rmdir $PDIR/.links
+mkdir $PDIR/.collected
+mkdir $PDIR/.collected/{bin,doc,man,etc,include}