1 |
#!/bin/sh |
2 |
|
3 |
if [ ! z$1 = zYES ]; then |
4 |
echo "usage: $0 YES" |
5 |
echo This will create lots of files in the current directory. |
6 |
echo Make sure you are standing in the right directory before |
7 |
echo running this script. |
8 |
exit |
9 |
fi |
10 |
|
11 |
HEADER=../make_doc_header.html |
12 |
FOOTER=../make_doc_header.html |
13 |
|
14 |
|
15 |
echo Generating documentation... |
16 |
|
17 |
|
18 |
DEVICES=`echo ../../src/devices/dev_*.c` |
19 |
|
20 |
rm -f tmp_devices.html |
21 |
echo "<b>Devices:</b>" >> tmp_devices.html |
22 |
echo "<pre>" >> tmp_devices.html |
23 |
for a in $DEVICES; do |
24 |
printf "<a href=dev_" >> tmp_devices.html |
25 |
X=`echo $a | cut -d _ -f 2-|cut -d . -f 1` |
26 |
printf $X >> tmp_devices.html |
27 |
printf ".html>$X</a>\n" >> tmp_devices.html |
28 |
done |
29 |
echo "</pre>" >> tmp_devices.html |
30 |
|
31 |
cat $HEADER > index.html |
32 |
printf "<td align=left valign=top>\n" >> index.html |
33 |
cat tmp_devices.html >> index.html |
34 |
printf "</td>\n" >> index.html |
35 |
printf "<td align=left valign=top>\n" >> index.html |
36 |
printf "Hello.\n" >> index.html |
37 |
printf "</td>\n" >> index.html |
38 |
cat $FOOTER >> index.html |
39 |
|
40 |
echo Done. |