2020-04-15 20:27:21 +03:00
|
|
|
#!/bin/sh
|
|
|
|
# Copyright 2020 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.
|
|
|
|
#
|
|
|
|
# Entry point for running python scripts on UNIX systems.
|
|
|
|
#
|
2021-03-22 21:43:02 +03:00
|
|
|
# Automatically generated by `create_entry_points.py`; DO NOT EDIT.
|
|
|
|
#
|
|
|
|
# To make modifications to this file, edit `tools/run_python.sh` and then run
|
2020-04-15 20:27:21 +03:00
|
|
|
# `tools/create_entry_points.py`
|
|
|
|
|
2020-07-11 00:06:41 +03:00
|
|
|
if [ -z "$PYTHON" ]; then
|
|
|
|
PYTHON=$EMSDK_PYTHON
|
|
|
|
fi
|
|
|
|
|
2020-05-01 03:30:04 +03:00
|
|
|
if [ -z "$PYTHON" ]; then
|
2020-04-15 20:27:21 +03:00
|
|
|
PYTHON=$(which python3 2> /dev/null)
|
|
|
|
fi
|
|
|
|
|
2020-05-01 03:30:04 +03:00
|
|
|
if [ -z "$PYTHON" ]; then
|
2020-04-15 20:27:21 +03:00
|
|
|
PYTHON=$(which python 2> /dev/null)
|
|
|
|
fi
|
|
|
|
|
2020-05-01 03:30:04 +03:00
|
|
|
if [ -z "$PYTHON" ]; then
|
2020-06-16 18:47:13 +03:00
|
|
|
echo 'unable to find python in $PATH'
|
2020-04-15 20:27:21 +03:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-05-01 03:30:04 +03:00
|
|
|
exec "$PYTHON" "$0.py" "$@"
|