|
|
|
@ -27,4 +27,19 @@ if [[ "$1" == "headless" || "$2" == "headless" ]]; then |
|
|
|
|
emrun --no_browser ${PROJECT_NAME}.html |
|
|
|
|
else |
|
|
|
|
emrun --serve_after_close ${PROJECT_NAME}.html |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if [ $? -eq 127 ] |
|
|
|
|
then |
|
|
|
|
echo "Failed to find Emscripten. Running install script." |
|
|
|
|
PWD=$(pwd) |
|
|
|
|
cd .. |
|
|
|
|
git clone https://github.com/emscripten-core/emsdk.git |
|
|
|
|
cd emsdk |
|
|
|
|
git pull |
|
|
|
|
./emsdk install latest |
|
|
|
|
./emsdk activate latest |
|
|
|
|
source ./emsdk_env.sh |
|
|
|
|
cd $PWD |
|
|
|
|
echo "Emscripten has been installed. Try running the command again." |
|
|
|
|
fi |