From 82c2bf8ed263133b4228a9b1ee5e011251004f92 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 8 Feb 2017 20:47:24 +0000 Subject: Ensure that all commands succed and move back to root --- scripts/build.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'scripts') 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 -- cgit