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
В конфигурации я добавил путь к файлу, подобный этому sh CodeFormatter/scripts/formatOpenedSources.sh, и я добавил файл CodeFormatter/scripts/formatOpenedSources.sh в проект –
@RaviKiran Измените 'sh' на'/bin/sh '. – trojanfoe