diff --git a/client/build.sh b/client/build.sh index b054404..eef8fd4 100755 --- a/client/build.sh +++ b/client/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + INCLUDE_DIR="build/curl-wasm/include/" LIB_DIR="build/curl-wasm/lib/" CACERT_FILE="cacert.pem" @@ -15,6 +17,7 @@ if [ ! -f $CACERT_FILE ]; then fi if [ ! -d $INCLUDE_DIR ]; then + mkdir -p build tools/openssl.sh tools/curl.sh fi diff --git a/client/tools/curl.sh b/client/tools/curl.sh index 9bdd4ed..d17358d 100755 --- a/client/tools/curl.sh +++ b/client/tools/curl.sh @@ -2,11 +2,15 @@ #compile openssl for use with emscripten +set -x +set -e + CORE_COUNT=$(nproc --all) PREFIX=$(realpath build/curl-wasm) OPENSSL_PREFIX=$(realpath build/openssl-wasm) mkdir -p $PREFIX +cd build rm -rf curl git clone -b master --depth=1 https://github.com/curl/curl cd curl @@ -23,4 +27,4 @@ cp -r include/curl $PREFIX/include cp lib/.libs/libcurl.a $PREFIX/lib cp -r $OPENSSL_PREFIX/* $PREFIX -cd .. +cd ../../ \ No newline at end of file diff --git a/client/tools/openssl.sh b/client/tools/openssl.sh index 4ab8ae3..c87781e 100755 --- a/client/tools/openssl.sh +++ b/client/tools/openssl.sh @@ -2,10 +2,14 @@ #compile openssl for use with emscripten +set -x +set -e + CORE_COUNT=$(nproc --all) PREFIX=$(realpath build/openssl-wasm) mkdir -p $PREFIX +cd build rm -rf openssl git clone -b master --depth=1 https://github.com/openssl/openssl cd openssl @@ -21,4 +25,4 @@ mkdir -p $PREFIX/lib cp -r include/openssl $PREFIX/include cp libcrypto.a libssl.a $PREFIX/lib -cd .. +cd ../../ \ No newline at end of file