diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-21 16:32:53 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-21 16:32:53 +0200 |
commit | 1cf417bc899a15fbf8d79cb5b25d1f0182cb96a7 (patch) | |
tree | 2064c190fcfc6b3bedfff65684021da086eaf3ea /bin/pkg | |
parent | 7bed8dbc079a3903608327f88a47604fe4e28234 (diff) |
bin/pkg: genocide_collected: also use zsh magic
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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 |