apr-util: moved to github
[openwrt.org/packages.git] / lang / strippm.sh
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# 
# Attempt to strip comments and pod docs from perl modules
#
 
[ "$#" -gt 0 ] || set .
echo "---> Stripping modules in: $@" >&2
find "$@" -name \*.pm -or -name \*.pl -or -name \*.pod | while read fn; do
        echo "   $fn" >&2
        sed -i -e '/^=\(head\|pod\|item\|over\|back\)/,/^=cut/d; /^=\(head\|pod\|item\|over\|back\)/,$d; /^#$/d; /^#[^!"'"'"']/d' "$fn"
done
 
comments