Cleanup emsdk_env scripts (#539)

Remove the optional argument to contruct_env.  It simple if we
always construct the env in the same place.  Avoid using temp files,
and avoid changing directory.
This commit is contained in:
Sam Clegg
2020-07-06 16:34:02 -07:00
committed by GitHub
parent 92d512faa8
commit 819e95cd99
6 changed files with 34 additions and 43 deletions

View File

@@ -21,16 +21,13 @@ else
set SRC="$SRC[2]"
endif
set CURDIR=`pwd`
cd `dirname "$SRC"`
set DIR=`dirname "$SRC"`
unset SRC
setenv EMSDK_CSH 1
set tmpfile=`mktemp` || exit 1
./emsdk construct_env $tmpfile
source $tmpfile
rm -f $tmpfile
$DIR/emsdk construct_env
source $DIR/emsdk_set_env.csh
unset DIR
unsetenv EMSDK_CSH
cd "$CURDIR"