summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-06-21 16:32:53 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-06-21 16:32:53 +0200
commit1cf417bc899a15fbf8d79cb5b25d1f0182cb96a7 (patch)
tree2064c190fcfc6b3bedfff65684021da086eaf3ea
parent7bed8dbc079a3903608327f88a47604fe4e28234 (diff)
bin/pkg: genocide_collected: also use zsh magic
-rwxr-xr-xbin/pkg14
1 files changed, 6 insertions, 8 deletions
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