diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2009-12-02 12:13:05 -0700 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2009-12-02 12:13:05 -0700 |
commit | 849cdc5ef0831ad7a4f5db5ade5c7bca9dc04f1c (patch) | |
tree | 82a3c11c45cc914969a1f51e83f08e73576ce3a3 /install | |
parent | 4f980767f857404fde341c5b1140157950699689 (diff) |
Use existing rebar for compile, if it's available
Diffstat (limited to 'install')
-rwxr-xr-x | install | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -3,11 +3,17 @@ # Fail on first error set -e -## Compile -erlc -I include -o ebin src/*.erl +## 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 ${@} |