Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 63 lines (52 sloc) 1.32 KB
#! /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 4 Erlang runtimes..."
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 "$@"