6 for filepath
in admin-tools
/* compiled-tools
/*.pod crawler-bin
/* root-tools
/* user-tools
/* xwin-tools
/*
10 echo $
'=pod\n\n=head1 FILEPATH '"$filepath"$
'\n\n=cut\n\n'
12 echo $
'=pod\n\n=head1 EOF '"$filepath"$
'\n\n=cut\n\n'
15 pod2text
-w 10000 --utf8 |\
16 while IFS
=$
'\n' read line
18 if [[ $line =~ ^FILEPATH
[\ \
]+(.
+) ]]
20 filepath
=${BASH_REMATCH[1]}
21 dirpath
=${filepath%/*}
23 elif [ "$line" = NAME
]
25 while IFS
=$
'\n' read line2
27 if [[ $line2 =~ ^
[\
]+([^
]+)[\
]+-[\
]+(.
+) ]]
29 name
=${BASH_REMATCH[1]}
30 description
=${BASH_REMATCH[2]}
32 filelink
=$dirpath/$name
33 if [ "${filepath: -4}" = .pod
]
35 filelink
=$dirpath/$name.c
37 if [ ! -e "$filelink" ]
39 filelink
=($dirpath/*/$name.
*)
40 filelink
=${filelink[0]}
42 if [ ! -e "$filelink" ]
47 echo "| [$name]($filelink) | $description"
48 elif [[ $line2 =~ ^
[^\ \
] ]]