Avoid writing to file in emsdk_env.csh / emsdk_env.sh (#544)
This is an alternative fix for https://github.com/emscripten-core/emscripten/issues/9090 which recently came up again after #539. Tested with bash, tcsh and fish.
This commit is contained in:
11
emsdk_env.csh
Executable file → Normal file
11
emsdk_env.csh
Executable file → Normal file
@@ -5,8 +5,6 @@
|
||||
# because it won't have any effect then.
|
||||
# That is, always run this script with
|
||||
#
|
||||
# . ./emsdk_env.csh
|
||||
# or
|
||||
# source ./emsdk_env.csh
|
||||
#
|
||||
# instead of just plainly running with
|
||||
@@ -18,16 +16,15 @@ set SRC=($_)
|
||||
if ("$SRC" == "") then
|
||||
set SRC="$0"
|
||||
else
|
||||
set SRC="$SRC[2]"
|
||||
set SRC="$SRC[1]"
|
||||
endif
|
||||
set CURDIR=`pwd`
|
||||
set DIR=`dirname "$SRC"`
|
||||
setenv DIR `dirname "$SRC"`
|
||||
unset SRC
|
||||
|
||||
setenv EMSDK_CSH 1
|
||||
|
||||
$DIR/emsdk construct_env
|
||||
source $DIR/emsdk_set_env.csh
|
||||
unset DIR
|
||||
eval `$DIR/emsdk construct_env`
|
||||
unsetenv DIR
|
||||
|
||||
unsetenv EMSDK_CSH
|
||||
|
||||
Reference in New Issue
Block a user