2014-01-07 2 views
0

Я установил uncrustify through brew (согласно инструкциям git), и я добавил фазу сборки сценария запуска в xcode и попытался построить проект ios, но сборка не удается со следующей ошибкой:ошибка с Uncrustify в 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** 

Как я могу исправить эту ошибку? Любая помощь будет оценена по достоинству. Заранее спасибо.

Мой ш сценарий:

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 

ответ

1

Похоже, что вы не имеете Shell набор для /bin/sh в Xcode Run Script конфигурации:

enter image description here

(Снимок сделан от here).

+0

В конфигурации я добавил путь к файлу, подобный этому sh CodeFormatter/scripts/formatOpenedSources.sh, и я добавил файл CodeFormatter/scripts/formatOpenedSources.sh в проект –

+0

@RaviKiran Измените 'sh' на'/bin/sh '. – trojanfoe