File: manpod2text.sh

package info (click to toggle)
dpsyco 1.0.35
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 744 kB
  • ctags: 19
  • sloc: sh: 2,204; makefile: 135
file content (23 lines) | stat: -rwxr-xr-x 566 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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