aboutsummaryrefslogtreecommitdiff
path: root/makedoc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'makedoc.sh')
-rwxr-xr-xmakedoc.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/makedoc.sh b/makedoc.sh
new file mode 100755
index 0000000..008579c
--- /dev/null
+++ b/makedoc.sh
@@ -0,0 +1,29 @@
1#!/bin/sh
2
3OUT=./src/helppages.h
4DOCDIR=./docs
5N=$(ls -1 $DOCDIR | wc -l)
6
7# This deletes the content of the file
8echo "/* To generate this help page, use the script makedoc.sh */" > $OUT
9
10echo "" >> $OUT
11echo "int Npages = $N;" >> $OUT
12echo "" >> $OUT
13echo "char *helppages[][10] = {" >> $OUT
14
15for f in $(ls $DOCDIR)
16do
17 name=$(echo "$f" | sed 's/\..*//')
18 echo "" >> $OUT
19 echo "{ \"$name\"," >> $OUT
20
21 echo "\"\\" >> $OUT
22 sed 's/$/\\n\\/;s/\"/\\\"/g' $DOCDIR/$f >> $OUT
23 echo "\"" >> $OUT
24
25 echo "}," >> $OUT
26done
27
28echo "};" >> $OUT
29

Generated with cgit - Back to sebastiano.tronto.net