rebar/install
2009-12-03 16:05:25 -07:00

20 lines
422 B
Bash
Executable file

#!/bin/bash
## 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
if [ $? != 0 ]; then
exit $?
fi
## Use application installer to perform actual installation
## into erlang distro
export ERL_LIBS=`(cd .. && pwd)`
priv/rebar install ${@}