2009-11-29 23:53:53 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2009-12-02 19:13:05 +00:00
|
|
|
## 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
|
2009-11-29 23:53:53 +00:00
|
|
|
|
2009-12-03 23:05:25 +00:00
|
|
|
if [ $? != 0 ]; then
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
2009-11-29 23:53:53 +00:00
|
|
|
## Use application installer to perform actual installation
|
|
|
|
## into erlang distro
|
2009-11-30 15:15:09 +00:00
|
|
|
export ERL_LIBS=`(cd .. && pwd)`
|
2009-11-30 16:57:20 +00:00
|
|
|
priv/rebar install ${@}
|