-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgen-module-docs.sh
More file actions
executable file
·43 lines (36 loc) · 1013 Bytes
/
gen-module-docs.sh
File metadata and controls
executable file
·43 lines (36 loc) · 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
mkdir documentation/modules/ 2>/dev/null
cat > documentation/modules/index.html <<EOF
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
<head><title>dfsch standard modules documentation</title>
EOF
if [ -f "$DOCGEN_HEAD_FILE" ]; then
cat "$DOCGEN_HEAD_FILE" >> documentation/modules/index.html
fi
cat >> documentation/modules/index.html <<EOF
</head>
<body>
<h1>dfsch standard modules documentation</h1>
<ul>
EOF
for i in $2; do
cmdpart='';
if [ -x $1/doc/module/${i}.md ]; then
cmdpart="--chapters $1/doc/module/$i.md";
fi;
./dfsch-run -L ./.libs -L $1/lib-scm \
$1/tools/docgen.scm --module $i --package-exported $i \
documentation/modules/${i} #>/dev/null 2>/dev/null
if [ $? -eq 0 ]; then
echo ${i}... OK
echo "<li><a href='${i}/'>${i}</a></li>" \
>> documentation/modules/index.html
else
echo ${i}... Error
fi
done
cat >> documentation/modules/index.html <<EOF
</ul>
</body>
</html>
EOF