forked from webb/xml-schema-documentation-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun
executable file
·45 lines (41 loc) · 945 Bytes
/
run
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
44
45
#!/usr/bin/env bash
. "$HOME"/share/wrtools-core/fail.bash
(( $# > 0 )) || fail "need a command"
command=$1
shift 1
case $command in
rebuild )
rm -rf build
make depend=true
make "$@"
;;
release )
rm -rf build
rm -rf .../repo/*
./configure install_dir=../repo xml_catalog=../../niem-releases/niem/xml-catalog.xml
make depend=true
make -k -j -l 50
make -k -j -l 50 install
date
;;
backlinks )
rm -f build/backlinks.xml
make build/backlinks.xml
;;
show )
remove=(rm -rf)
build=(make -j 8)
for path in "$@"
do remove+=( "build/$path" )
build+=( "build/$path/index.html" )
done
"${remove[@]}"
"${build[@]}"
if (( $# > 0 ))
then open "${build[3]}"
fi
;;
* )
fail "unknown command $1"
;;
esac