forked from ATOMSLab/doc-gen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_docs
executable file
·39 lines (36 loc) · 933 Bytes
/
gen_docs
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
#!/usr/bin/env bash
link=0
site_root='/'
while [ "$1" != "" ]; do
case $1 in
-t | --target ) shift
target=$1
;;
-r | --source ) shift
source=$1
;;
-w | --web ) shift
site_root=$1
;;
-l | --link ) link=1
;;
* )
exit 1
esac
shift
done
if [ -z "$source" ]; then
source=_target/deps/mathlib/
fi
args=()
if [ -n "$target" ]; then
args+=( '-t' )
args+=( "$target" )
fi
if [ "$link" -eq "1" ]; then
args+=('-l')
fi
bash "$source"scripts/mk_all.sh
lean --run src/entrypoint.lean >export.json
bash "$source"scripts/rm_all.sh
python3 print_docs.py -r "$source" -w "$site_root" "${args[@]}"