Skip to content

Commit 8f88b6d

Browse files
committed
Hide output of emsdk installation
1 parent 6cd1dd3 commit 8f88b6d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

ci/emscripten.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,30 @@
1010

1111
set -ex
1212

13+
hide_output() {
14+
set +x
15+
on_err="
16+
echo ERROR: An error was encountered with the build.
17+
cat /tmp/build.log
18+
exit 1
19+
"
20+
trap "$on_err" ERR
21+
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
22+
PING_LOOP_PID=$!
23+
$@ &> /tmp/build.log
24+
trap - ERR
25+
kill $PING_LOOP_PID
26+
rm -f /tmp/build.log
27+
set -x
28+
}
29+
1330
cd /
1431
curl -L https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
1532
tar -xz
1633

1734
cd /emsdk-portable
1835
./emsdk update
19-
./emsdk install sdk-1.37.13-64bit
36+
hide_output ./emsdk install sdk-1.37.13-64bit
2037
./emsdk activate sdk-1.37.13-64bit
2138

2239
# Compile and cache libc

0 commit comments

Comments
 (0)