summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-06-03 19:00:07 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-06-03 19:00:07 +0200
commitdca4023181c1be81f59c04219c37901dfaa12fc0 (patch)
tree8ee9e34caa4f9573f8f8acf1339f5a6a5919def4 /bin/pkg
parent0944f17d271c4703dee723b46ed715f630a78db7 (diff)
automatically copy docs to .collected
Diffstat (limited to 'bin/pkg')
-rwxr-xr-xbin/pkg17
1 files changed, 16 insertions, 1 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"
}