aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-09 04:47:24 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-09 04:51:29 +0800
commit82c2bf8ed263133b4228a9b1ee5e011251004f92 (patch)
treec8bbc4b6af9132c8c442166e98aad78b488acb89 /scripts
parentb0729d0e764122cce13943cbdd303ae1fb8c3f4e (diff)
downloaddexon-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-xscripts/build.sh18
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