axmol/tools/cocos2d-console/bin/cocos

22 lines
414 B
Plaintext
Raw Normal View History

2020-08-05 14:10:09 +08:00
#!/bin/bash -l
COCOS_CONSOLE_BIN_DIRECTORY=$(dirname "$0")
COCOS_CONSOLE_BIN_DIRECTORY=$(cd "$COCOS_CONSOLE_BIN_DIRECTORY" && pwd -P)
if hash python2 2>/dev/null; then
PYTHON=python2
else
if hash python 2>/dev/null; then
VERSION="python --version"
2021-04-26 00:22:07 +08:00
PYTHON=python
2020-08-05 14:10:09 +08:00
else
echo "Python 2+ required."
2020-08-05 14:10:09 +08:00
exit 1
fi
fi
$PYTHON "$COCOS_CONSOLE_BIN_DIRECTORY/cocos.py" "$@"