summaryrefslogtreecommitdiff
path: root/install
blob: f88acfa53c0ceddcf6af5e93ec52b9367476fee5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

# Fail on first error
set -e

## 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)`
priv/rebar install ${@}