summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-06-14 11:51:05 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-06-14 11:51:05 +0200
commit6cedd14690f59db2157fcea9508472d19b2dd381 (patch)
tree8b59bdcdd9dd9bcc5e9009899087971d3ca65d2b
parent8d9b64bd55067cd002d39f674c497cdca9e3e096 (diff)
bin/pkg: Remove documentation when removing a program
-rwxr-xr-xbin/pkg16
1 files changed, 11 insertions, 5 deletions
diff --git a/bin/pkg b/bin/pkg
index 1638a25..9b6e65b 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -206,11 +206,17 @@ populate_collected () {
genocide_collected () {
cd $PDIR/$1 || return
info "Removing documentation"
-# if ([ -d man ]) {
-# for i in man/*/*; {
-# rm $PDIR/.collected/$i
-# }
-# }
+ if ([ -d man ]) {
+ for section in man/*; {
+ section=$(basename $section)
+ for manual in man/$section/*; {
+ manual=$(basename $manual)
+ if ([ -e $PDIR/.collected/man/man$section/$manual ]) {
+ rm $PDIR/.collected/man/man$section/$manual
+ }
+ }
+ }
+ }
if ([ -d bin ]) {
for i in bin/*; {
rm -f $PDIR/.collected/man/man1/$(basename $i).1