diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-09 04:47:24 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-09 04:51:29 +0800 |
commit | 82c2bf8ed263133b4228a9b1ee5e011251004f92 (patch) | |
tree | c8bbc4b6af9132c8c442166e98aad78b488acb89 /scripts | |
parent | b0729d0e764122cce13943cbdd303ae1fb8c3f4e (diff) | |
download | dexon-solidity-82c2bf8ed263133b4228a9b1ee5e011251004f92.tar.gz dexon-solidity-82c2bf8ed263133b4228a9b1ee5e011251004f92.tar.zst dexon-solidity-82c2bf8ed263133b4228a9b1ee5e011251004f92.zip |
Ensure that all commands succed and move back to root
Diffstat (limited to 'scripts')
-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 |