1#!/bin/sh 2set -ex 3 4hide_output() { 5 set +x 6 on_err=" 7echo ERROR: An error was encountered with the build. 8cat /tmp/build.log 9exit 1 10" 11 trap "$on_err" ERR 12 bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & 13 PING_LOOP_PID=$! 14 "$@" &> /tmp/build.log 15 trap - ERR 16 kill $PING_LOOP_PID 17 rm -f /tmp/build.log 18 set -x 19} 20 21git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable 22cd /emsdk-portable 23hide_output ./emsdk install 1.39.20 24./emsdk activate 1.39.20 25