File: //usr/local/share/aliyun-assist/plugin/ecsgo-helper/0.48/ecsgo-helper.sh
#!/bin/sh
EH_INSTALL_DIR="${0%/*}"
if [ X"$EH_INSTALL_DIR" = X"$0" ]; then
# No slash means locating in current working directory
EH_INSTALL_DIR="."
fi
# Use the Python runtime in environment variable EH_INTERPRETER if specified
if [ X"$EH_INTERPRETER" = X"" ]; then
# ...or find a compatible Python interpreter available in the environemnt
if command -v python2.7 > /dev/null; then
EH_INTERPRETER=python2.7
elif command -v python3.13 > /dev/null; then
EH_INTERPRETER=python3.13
elif command -v python3.12 > /dev/null; then
EH_INTERPRETER=python3.12
elif command -v python3.11 > /dev/null; then
EH_INTERPRETER=python3.11
elif command -v python3.10 > /dev/null; then
EH_INTERPRETER=python3.10
elif command -v python3.9 > /dev/null; then
EH_INTERPRETER=python3.9
elif command -v python3.8 > /dev/null; then
EH_INTERPRETER=python3.8
elif command -v python3.7 > /dev/null; then
EH_INTERPRETER=python3.7
elif command -v python3.6 > /dev/null; then
EH_INTERPRETER=python3.6
elif command -v python3.13t > /dev/null; then
EH_INTERPRETER=python3.13t
elif command -v python3.14 > /dev/null; then
EH_INTERPRETER=python3.14
elif command -v python3.14t > /dev/null; then
EH_INTERPRETER=python3.14t
else
echo "Failed to find compatible Python environment" >&2
exit 125
fi
fi
exec $EH_INTERPRETER $EH_INTERPARGS $EH_INSTALL_DIR/src/main.py "$@"