diff options
-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 |