]> git.lizzy.rs Git - rust.git/commitdiff
travis: try to fix the build on emscripten
authorAriel Ben-Yehuda <ariel.byd@gmail.com>
Sat, 25 Mar 2017 12:01:25 +0000 (15:01 +0300)
committerAriel Ben-Yehuda <ariel.byd@gmail.com>
Sat, 25 Mar 2017 14:36:54 +0000 (17:36 +0300)
The emsdk-portable .tar.gz now extracts to emsdk-portable instead of
emsdk_portable. Handle that.

src/ci/docker/emscripten/build-emscripten.sh

index 88bf583007ce53f296b5a2405dac1174025d94a9..b9aa197f85e0dc4ea6ab481e89be89e6b168165a 100755 (executable)
@@ -29,7 +29,20 @@ exit 1
 }
 
 curl https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
-      tar xzf -
+    tar xzf -
+
+# Some versions of the EMSDK archive have their contents in .emsdk-portable
+# and others in emsdk_portable. Make sure the EMSDK ends up in a fixed path.
+if [ -d emsdk-portable ]; then
+    mv emsdk-portable emsdk_portable
+fi
+
+if [ ! -d emsdk_portable ]; then
+    echo "ERROR: Invalid emsdk archive. Dumping working directory." >&2
+    ls -l
+    exit 1
+fi
+
 source emsdk_portable/emsdk_env.sh
 hide_output emsdk update
 hide_output emsdk install --build=Release sdk-tag-1.37.1-32bit