Files
ci-emsdk/emsdk_env.sh

31 lines
580 B
Bash
Raw Normal View History

2014-11-18 00:42:02 +00:00
# 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.
2014-11-18 00:42:02 +00:00
SRC="$BASH_SOURCE"
if [ "$SRC" = "" ]; then
SRC="$0"
2014-11-18 00:42:02 +00:00
fi
CURDIR="$(pwd)"
cd "$(dirname "$SRC")"
2014-11-18 00:42:02 +00:00
unset SRC
tmpfile=`mktemp` || exit 1
./emsdk construct_env "$@" $tmpfile
. $tmpfile
rm -f $tmpfile
2014-11-18 00:42:02 +00:00
cd "$CURDIR"