diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-21 16:23:25 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-21 16:23:25 +0200 |
commit | 7bed8dbc079a3903608327f88a47604fe4e28234 (patch) | |
tree | 01618c51435678410a2b947a5e527b06fbcd4687 /bin/pkg | |
parent | 825c86fbfd2aaf2461a01b66ea58fa83b3e7c403 (diff) |
bin/pkg: Use more zsh magic
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -192,23 +192,21 @@ populate_collected () { cd $PDIR/$1 || return info "Enabling documentation " if ([ -d man ]) { - for section in man/*; { - section=$(basename $section) - for manpage in man/$section/*; { - manpage=$(basename $manpage) - if (podchecker man/$section/$manpage &> /dev/null) { - pod2man -s $section -c "$1 package" -r "/home/derf" man/$section/$manpage > $PDIR/.collected/man/man$section/$manpage.$section - echo -n "+" - } else { - echo -n "." - } + for i in man/*/*; { + section=${i:h:t} + manpage=${i:t} + if (podchecker man/$section/$manpage &> /dev/null) { + pod2man -s $section -c "$1 package" -r "/home/derf" man/$section/$manpage > $PDIR/.collected/man/man$section/$manpage.$section + echo -n "+" + } else { + echo -n "." } } } if ([ -d bin ]) { for i in bin/*; { if (podchecker $i &> /dev/null) { - pod2man $i > $PDIR/.collected/man/man1/$(basename $i).1 + pod2man $i > $PDIR/.collected/man/man1/${i:t}.1 echo -n "+" } else { echo -n "." |