sh: cocos: command not found
解决
执行cocos2dx安装脚本『跟目录的setup.py』
根据提示进行配置。
# Add environment variable COCOS_CONSOLE_ROOT for cocos2d-x
export COCOS_CONSOLE_ROOT=/Users/baodong/cocos/cocos2d-x-3.7.1/tools/cocos2d-console/bin
export PATH=$COCOS_CONSOLE_ROOT:$PATH
# Add environment variable COCOS_TEMPLATES_ROOT for cocos2d-x
export COCOS_TEMPLATES_ROOT=/Users/baodong/cocos/cocos2d-x-3.7.1/templates
export PATH=$COCOS_TEMPLATES_ROOT:$PATH
# Add environment variable ANDROID_SDK_ROOT for cocos2d-x
export ANDROID_SDK_ROOT=/Users/baodong/Library/Android/sdk
export PATH=$ANDROID_SDK_ROOT:$PATH
export PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH
# Add environment variable ANT_ROOT for cocos2d-x
export ANT_ROOT=/Users/baodong/__DEV__/apache-ant-1.9.5/bin
export PATH=$ANT_ROOT:$PATH
# Add environment variable NDK_ROOT for cocos2d-x
export NDK_ROOT=/Users/baodong/__DEV__/android-ndk-r10e
export PATH=$NDK_ROOT:$PATH