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

12
install
View file

@ -3,11 +3,17 @@
# Fail on first error # Fail on first error
set -e set -e
## Compile ## Check path for exiting rebar instance -- if it's around, use it
erlc -I include -o ebin src/*.erl ## 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 ## Use application installer to perform actual installation
## into erlang distro ## into erlang distro
export ERL_LIBS=`(cd .. && pwd)` export ERL_LIBS=`(cd .. && pwd)`
echo $ERL_LIBS
priv/rebar install ${@} priv/rebar install ${@}