Files
ci-emsdk/emsdk
Sam Clegg a562ff7bda Use a wrapper script for running emsdk.py (#292)
This change moves the python code for emsdk into a file ending in .py.
This script is then run via emsdk.bat on windows or emsdk (a shell
script) on non-windows.

This avoid the #!/bin/sh at the top of the python script and the "exec"
hack on the first line that re-runs it under python.  Hopefully this
preserves the intent of #273 without jumping through so many hoops.
2019-08-27 14:02:50 -07:00

19 lines
537 B
Bash
Executable File

#!/bin/sh
# Copyright 2019 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
# Wrapper script that runs emsdk.py
base_dir=$(dirname "$0")
# Look for python3 first. This is especially important on macOS (See:
# https://github.com/emscripten-core/emsdk/pull/273)
python=$(which python3)
if [ $? != 0 ]; then
python=python
fi
exec $python $0.py "$@"