Allow EMCC_BASH to force bash during construct_env (#493)

This allows `emsdk_env.sh` to work under bash for windows even in the
absence of the `MSYSTEM` environment variable (which seems to be 
the setup on circle CI.
This commit is contained in:
Sam Clegg
2020-05-07 11:31:02 -04:00
committed by GitHub
parent 99320fcf1e
commit a8263f30af
2 changed files with 34 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
#!/bin/bash
# This script is sourced by the user and uses
# their shell. Try not to use bashisms.
@@ -23,7 +24,8 @@ cd "$(dirname "$SRC")"
unset SRC
tmpfile=`mktemp` || exit 1
./emsdk construct_env $tmpfile
# Force emsdk to use bash syntax so that this works in windows + bash too
EMSDK_BASH=1 ./emsdk construct_env $tmpfile
. $tmpfile
rm -f $tmpfile