Merge pull request #22 from aidanhs/aphs-bash-source
Use $BASH_SOURCE to find location of emsdk_env.sh
This commit is contained in:
14
emsdk_env.sh
14
emsdk_env.sh
@@ -1,6 +1,14 @@
|
|||||||
#!/bin/bash
|
# This script is sourced by the user and uses
|
||||||
|
# their shell. Try not to use bashisms.
|
||||||
|
|
||||||
|
SRC="$BASH_SOURCE"
|
||||||
|
if [ "$SRC" = "" ]; then
|
||||||
|
SRC="$_"
|
||||||
|
fi
|
||||||
|
pushd `dirname "$SRC"` > /dev/null
|
||||||
|
unset SRC
|
||||||
|
|
||||||
pushd `dirname "$_"` > /dev/null
|
|
||||||
./emsdk construct_env
|
./emsdk construct_env
|
||||||
source ./emsdk_set_env.sh
|
. ./emsdk_set_env.sh
|
||||||
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user