Use existing rebar for compile, if it's available

This commit is contained in:
Dave Smith 2009-12-02 12:13:05 -07:00
parent 4f980767f8
commit 849cdc5ef0

10
install
View file

@ -3,11 +3,17 @@
# Fail on first error
set -e
## Compile
## Check path for exiting rebar instance -- if it's around, use it
## for compilation (NOT installation!)
`which -s rebar`
if [ $? == 0 ]; then
rebar compile ${@}
else
## Use raw erlc..
erlc -I include -o ebin src/*.erl
fi
## Use application installer to perform actual installation
## into erlang distro
export ERL_LIBS=`(cd .. && pwd)`
echo $ERL_LIBS
priv/rebar install ${@}