Files
ci-emsdk/emsdk_env.csh
Sam Clegg 819e95cd99 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.
2020-07-06 16:34:02 -07:00

34 lines
612 B
Tcsh
Executable File

# This script is sourced by the user and uses
# their shell. Try not to use tcshisms.
# Do not execute this script without sourcing,
# 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
#
# ./emsdk_env.csh
#
# which won't have any effect.
set SRC=($_)
if ("$SRC" == "") then
set SRC="$0"
else
set SRC="$SRC[2]"
endif
set CURDIR=`pwd`
set DIR=`dirname "$SRC"`
unset SRC
setenv EMSDK_CSH 1
$DIR/emsdk construct_env
source $DIR/emsdk_set_env.csh
unset DIR
unsetenv EMSDK_CSH