1 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,24 @@ |
1 |
+#!/bin/bash |
|
2 |
+if [ -e toolchain-emscripten ] ; then |
|
3 |
+ echo "ERROR: A toolchain-emscripten directory already exists, aborting install" |
|
4 |
+ echo "NOTE: To upgrade the installation, use ./update-toolchain-emscripten.sh" |
|
5 |
+ exit 1 |
|
6 |
+fi |
|
7 |
+parentdir=$(pwd) |
|
8 |
+mkdir -p toolchain-emscripten |
|
9 |
+cd toolchain-emscripten |
|
10 |
+git clone https://github.com/emscripten-core/emsdk.git |
|
11 |
+cat > env.sh <<'EOF' |
|
12 |
+#!/bin/bash |
|
13 |
+echo "Reminder: this script has to be used with source (.) instead of exec" |
|
14 |
+EOF |
|
15 |
+echo "export PATH=$parentdir/toolchain-emscripten/emsdk:$parentdir/toolchain-emscripten/emsdk/upstream/emscripten:\$PATH" >> env.sh |
|
16 |
+echo "export EMSDK=$parentdir/toolchain-emscripten/emsdk" >> env.sh |
|
17 |
+chmod 755 env.sh |
|
18 |
+cd .. |
|
19 |
+./update-toolchain-emscripten.sh |
|
20 |
+echo "" |
|
21 |
+echo "Installation complete." |
|
22 |
+echo "To use the emscripten toolchain, first include env.sh with \". toolchain-emscripten/env.sh\"" |
|
23 |
+ |
|
24 |
+ |