From dca4023181c1be81f59c04219c37901dfaa12fc0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 3 Jun 2008 19:00:07 +0200 Subject: automatically copy docs to .collected --- bin/pkg | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'bin/pkg') 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" } -- cgit v1.2.3