diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-09 05:23:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-09 05:23:31 +0800 |
commit | b66d9c3258c986c44e013595da5b021b7cdf8775 (patch) | |
tree | 23665d6605b25ca28405d7d76da6b3bfefe86281 | |
parent | 2ac766b18b0b24149697adfd3a3e966f6637c1c8 (diff) | |
parent | 82c2bf8ed263133b4228a9b1ee5e011251004f92 (diff) | |
download | dexon-solidity-b66d9c3258c986c44e013595da5b021b7cdf8775.tar.gz dexon-solidity-b66d9c3258c986c44e013595da5b021b7cdf8775.tar.zst dexon-solidity-b66d9c3258c986c44e013595da5b021b7cdf8775.zip |
Merge pull request #1667 from ethereum/build-fix
Build script: ensure that all commands succeed and move back to root
-rwxr-xr-x | scripts/build.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index e056ae4a..3785e1c1 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,17 +1,23 @@ #!/usr/bin/env bash -if [ -z "$1" ]; then +if [ -z "$1" ]; then BUILD_TYPE=Release -else +else BUILD_TYPE="$1" fi -cd $(dirname "$0") -mkdir -p build -cd build -cmake .. -DCMAKE_BUILD_TYPE="$BUILD_TYPE" +cd $(dirname "$0")/.. && +mkdir -p build && +cd build && +cmake .. -DCMAKE_BUILD_TYPE="$BUILD_TYPE" && make -j2 +if [ $? -ne 0 ]; then + echo "Failed to build" + exit 1 +fi + if [ -z $CI ]; then + echo "Installing solc and soltest" install solc/solc /usr/local/bin && install test/soltest /usr/local/bin fi
\ No newline at end of file |