From 1cf417bc899a15fbf8d79cb5b25d1f0182cb96a7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 21 Jun 2008 16:32:53 +0200 Subject: bin/pkg: genocide_collected: also use zsh magic --- bin/pkg | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'bin/pkg') diff --git a/bin/pkg b/bin/pkg index 1986a17..e75fe1c 100755 --- a/bin/pkg +++ b/bin/pkg @@ -230,19 +230,17 @@ genocide_collected () { cd $PDIR/$1 || return info "Removing documentation" 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 - } + for i in man/*/*; { + section=${i:h:t} + manual=${i:t} + 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 + rm -f $PDIR/.collected/man/man1/${i:t}.1 } } clear_line -- cgit v1.2.3