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