From 6cedd14690f59db2157fcea9508472d19b2dd381 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 14 Jun 2008 11:51:05 +0200 Subject: bin/pkg: Remove documentation when removing a program --- bin/pkg | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3