forked from hflicka/arden2bytecode-homepage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakedocs
executable file
·41 lines (29 loc) · 1.07 KB
/
makedocs
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
#!/bin/sh
set -e
# this script generates developer documentation from all README.md files in the git repositories cloned below
echo "generating developer docs..."
# repository url prefix:
REPOSRC=https://github.com/PLRI
TMPDIR=$(mktemp -d)
OUTPUT=/home/project-web/arden2bytecode/arden2bytecode-homepage/htdocs/includes/developerdocs.html
if [ -n "$1" ]; then
OUTPUT=$1
fi
pushd $TMPDIR
# important git setting:
export GIT_SSL_NO_VERIFY=true
# get all arden2bytecode repos
git clone $REPOSRC/example-mlms.git
git clone $REPOSRC/arden2bytecode-homepage.git
git clone $REPOSRC/ardensyntax-eclipse-plugin.git
git clone $REPOSRC/arden2bytecode.git
# clone and compile markdown parser
git clone https://github.com/vmg/sundown.git
cd sundown
make
cd ..
popd
# concatenate all markdown files and add headings
find $TMPDIR -name README.md -and -not -name sundown -exec echo \<hr\>\<h1 class=\"mdname\"\>NAME:{}\</h1\>\<div class=\"doc\"\> \; -exec $TMPDIR/sundown/sundown {} \; -exec echo \</div\> \; | sed "s|NAME:$TMPDIR/||" > $OUTPUT
rm -rf $TMPDIR
echo "done. docs are in $OUTPUT"