繁体   English   中英

ios应用的xcode中的Uncrustify错误

[英]error with Uncrustify in xcode for an ios app

我已经通过brew安装了unrustify(按照git的说明),并且将运行脚本构建阶段添加到了xcode中,并尝试构建ios项目,但是构建失败并出现以下错误:

**/bin/sh: /Users/test/Library/Developer/Xcode/DerivedData/testProj- amlbymrfycxuzmemclwtovltjxzl/Build/Intermediates/testProj.build/Debug-iphoneos/testProj.build/Script-AC898878187BE0A00056CAB1.sh: sh: bad interpreter: No such file or directory**

如何解决此错误? 任何帮助,将不胜感激。 提前致谢。

我的sh脚本:

if [ -n "$1" ]
    then

    # recover directory to format :
    pathToSourcesDirectory=`echo $(pwd)/$1`

    # go to current folder :
    scriptDirectory=$(dirname $0)
    cd $scriptDirectory

    # find sources files to format :
    echo ""
    echo "==> Getting files to format in directory " + $pathToSourcesDirectory
    mkdir -p temp
    find $pathToSourcesDirectory -name "*.[mh]" > temp/sources_to_uncrustify.txt

    # format files :
    echo ""
    echo "==> Format files" 
    /usr/local/bin/uncrustify -F temp/sources_to_uncrustify.txt -c "../uncrustify_objective_c.cfg" --no-backup 

    # remove temp files : 
    rm -rf temp/

else 
    echo "Error : You must specify a source folder as first parameter"  

fi

看来您没有在Xcode Run Script配置中将Shell设置为/bin/sh

在此处输入图片说明

(屏幕截图是从此处截取的)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM