-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sh
57 lines (44 loc) · 801 Bytes
/
build.sh
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
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
######
#
# Author:
# Richar Kent (https://github.com/sparverius)
#
######
make_all() {
make -C srcgen all
}
######
#
# For when this repository is cloned without --recursive flag
#
######
clone_xatsopt() {
if [ ! -d xatsopt/srcgen ]; then
git clone https://github.com/xanadu-lang/xatsopt.git
fi
}
######
XINTERP_SCRIPT='#!/bin/sh
XINTERP='${PWD}/bin/xinterp'
if [ ! "$XATSHOME" ] ; then
export XATSHOME='${PWD}/xatsopt'
fi
if [ -f "$XINTERP" ] ; then
"$XINTERP" "$@"
else
# if build failed or "make cleanall" was executed
echo "please execute `make all` to build [xinterp]"
fi
'
generate_script() {
printf "${XINTERP_SCRIPT}" > ./bin/xinterp.sh
}
######
main() {
clone_xatsopt
make_all
generate_script
}
main
###### end of [build.sh] ######