You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
367 B

#!/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