diff options
Diffstat (limited to 'libc/ci/emscripten.sh')
-rw-r--r-- | libc/ci/emscripten.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libc/ci/emscripten.sh b/libc/ci/emscripten.sh index d802585..ce3b541 100644 --- a/libc/ci/emscripten.sh +++ b/libc/ci/emscripten.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. @@ -17,10 +18,10 @@ echo ERROR: An error was encountered with the build. cat /tmp/build.log exit 1 " - trap "$on_err" ERR + trap '$on_err' ERR bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & PING_LOOP_PID=$! - $@ &> /tmp/build.log + "${@}" &> /tmp/build.log trap - ERR kill $PING_LOOP_PID rm -f /tmp/build.log @@ -28,7 +29,7 @@ exit 1 } cd / -curl -L https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \ +curl --retry 5 -L https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \ tar -xz cd /emsdk-portable @@ -37,6 +38,7 @@ hide_output ./emsdk install sdk-1.37.20-64bit ./emsdk activate sdk-1.37.20-64bit # Compile and cache libc +# shellcheck disable=SC1091 source ./emsdk_env.sh echo "main(){}" > a.c HOME=/emsdk-portable/ emcc a.c @@ -49,6 +51,6 @@ chmod a+rxw -R /emsdk-portable # node 8 is required to run wasm cd / -curl -L https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \ +curl --retry 5 -L https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \ tar -xJ |