-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.sh
26 lines (22 loc) · 642 Bytes
/
env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
echo "This script should be sourced, not executed."
exit 1
fi
if [ -n "${EMSDK}" ]; then
if [ -z "$SKIP_EMSDK_MESSAGE" ]; then
echo "EMSDK is already set."
fi
return 0
fi
if [ -z "${EMSDK_ROOT}" ]; then
echo "Error: EMSDK_ROOT is not set. Please set the EMSDK_ROOT" \
" environment variable to point to your Emscripten SDK" \
" installation directory." >&2
return 1
fi
. "${EMSDK_ROOT}/emsdk_env.sh" || {
echo "Error: Failed to set up Emscripten SDK environment from" \
" ${EMSDK_ROOT}/emsdk_env.sh" >&2
exit 1
}