packages/lang/perl/files/strippm.sh
matteo 61173f388a packaged full perl, thanks Peter Colberg (closes #3708)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@11626 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-07-03 02:32:44 +00:00

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