2014-11-18 00:42:02 +00:00
|
|
|
# This script is sourced by the user and uses
|
|
|
|
|
# their shell. Try not to use bashisms.
|
|
|
|
|
|
2014-12-30 18:55:49 +02:00
|
|
|
# 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.
|
2014-11-18 00:42:02 +00:00
|
|
|
SRC="$BASH_SOURCE"
|
|
|
|
|
if [ "$SRC" = "" ]; then
|
2015-04-15 20:42:18 +09:00
|
|
|
SRC="$0"
|
2014-11-18 00:42:02 +00:00
|
|
|
fi
|
2019-03-06 11:35:35 -05:00
|
|
|
CURDIR="$(pwd)"
|
|
|
|
|
cd "$(dirname "$SRC")"
|
2014-11-18 00:42:02 +00:00
|
|
|
unset SRC
|
2014-07-03 18:50:00 +03:00
|
|
|
|
2019-07-26 19:50:10 -04:00
|
|
|
tmpfile=`mktemp` || exit 1
|
|
|
|
|
./emsdk construct_env "$@" $tmpfile
|
|
|
|
|
. $tmpfile
|
|
|
|
|
rm -f $tmpfile
|
2014-11-18 00:42:02 +00:00
|
|
|
|
2019-03-06 11:35:35 -05:00
|
|
|
cd "$CURDIR"
|