Files
ci-emsdk/emsdk_env.sh
Fumiya Chiba 3bf41eba42 Use $0 to get execution path
$_ is "The last argument of the previous command." (cf. man zshparam) on
zsh, so SRC will be "]".
2015-04-15 20:48:20 +09:00

29 lines
535 B
Bash
Executable File

# This script is sourced by the user and uses
# their shell. Try not to use bashisms.
# Do not execute this script without sourcing,
# because it won't have any effect then.
# That is, always run this script with
#
# . ./emsdk_env.sh
# or
# source ./emsdk_env.sh
#
# instead of just plainly running with
#
# ./emsdk_env.sh
#
# which won't have any effect.
SRC="$BASH_SOURCE"
if [ "$SRC" = "" ]; then
SRC="$0"
fi
pushd `dirname "$SRC"` > /dev/null
unset SRC
./emsdk construct_env
. ./emsdk_set_env.sh
popd > /dev/null