Add Emscripten auto-install when it's not detected on the system.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 2 years ago
parent de31ec2611
commit bf4bb0cf12
  1. 2
      C++/scripts/md5
  2. 15
      C++/scripts/web.sh

@ -4,4 +4,4 @@ debug.sh:849488515cab075948653c15eec4177b -
lines.sh:3b907786f7fc9204025993016c9080de -
release.sh:0ab321c3fa2f1a1b2f03b1aec3bce816 -
temp:d41d8cd98f00b204e9800998ecf8427e -
web.sh:e317e1d492d00517a0ac0e460239daa0 -
web.sh:ce7a991e69dd9745f057d06430e51a9e -

@ -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
Loading…
Cancel
Save