我有此脚本做出自动增量上构造每个版本号:bash脚本返回Shell脚本调用错误
#!/bin/bash
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $INFOPLIST_FILE)
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" $INFOPLIST_FILE
我插入它在构建阶段“复制包资源”之前。首先,在壳牌场我离开了缺省的/ bin/sh的,但它给了我一个Shell Script Invocation Error
说:
Command /bin/sh failed with exit code 1
所以我抬头做什么,我发现改变壳牌/bin/bash
可以修复它。我这样做,我仍然有同样的错误。它仍然告诉我,Command /bin/sh failed with exit code 1
。为什么它仍然告诉我,如果/ bin/sh不存在,我有一个错误?