-
Notifications
You must be signed in to change notification settings - Fork 10
/
build
executable file
·63 lines (53 loc) · 1.34 KB
/
build
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
58
59
60
61
62
63
#! /bin/bash
source ./build_utils.sh
setup_otp() {
echo "Setup Erlang tools - the first time, this might take 30 minutes or more, as we need to build up to 3 Erlang runtimes..."
mkdir -p ~/erlide_tools
if [ ! -e ~/erlide_tools/kerl ]; then
curl -s 'https://raw.githubusercontent.com/kerl/kerl/master/kerl' > ~/erlide_tools/kerl
chmod u+x ~/erlide_tools/kerl
fi
~/erlide_tools/kerl update releases > /dev/null
for v in "${OTP_VSNS[@]}"; do
~/erlide_tools/kerl build $v $v
if [ ! -e ~/erlide_tools/$v ]; then
~/erlide_tools/kerl install $v ~/erlide_tools/$v
else
echo "OTP $v already installed"
fi
done
}
export LOCALDEP_DIR=`pwd`
export REBAR_COLOR="low"
#export QUIET=1
main() {
arg=${1:-compile}
setup_otp
find . -name build | xargs chmod u+x
case "$arg" in
"compile")
cmds="do clean -a, compile -v"
;;
"test")
cmds="do eunit -c -v, cover -v"
;;
"xref")
cmds="do xref"
;;
"dialyzer")
cmds="do dialyzer"
;;
esac
set -e
cd common
./build $cmds
cd ../debugger
./build $cmds
cd ../ide
./build $cmds
if [ "$arg" == "compile" ] ; then
./build escriptize
fi
cd ..
}
main "$@"