61173f388a
git-svn-id: svn://svn.openwrt.org/openwrt/packages@11626 3c298f89-4303-0410-b956-a3cf2f4a3e73
12 lines
368 B
Bash
12 lines
368 B
Bash
#!/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
|