#!/bin/sh
# This scripts content was contributed by:
# Michael Boman <michael.boman@securecirt.com>
#
# Some things added to make it more useful.
# Intended to be run from the source root dir.
# Depends on: perldoc to run.
#
# You can give it one argument and that is where to place the files.
tmp=tmp
if [ ! -z "$1" ] ; then
    tmp="$1"
fi

if [ -d $tmp ] ; then
    rm -Rf $tmp
fi
mkdir $tmp
cd $tmp
# This is the contributed script.
for file in `find .. -name "*.pod" -print`; do
    PERLDOC_PAGER=cat perldoc -t $file > `basename $file | sed s/pod/txt/g`;
done
