mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Use existing rebar for compile, if it's available
This commit is contained in:
parent
4f980767f8
commit
849cdc5ef0
1 changed files with 9 additions and 3 deletions
12
install
12
install
|
@ -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 ${@}
|
||||||
|
|
Loading…
Reference in a new issue