Skip to content

Instantly share code, notes, and snippets.

@sendoa
Forked from rjstelling/cs_xproj_validate.sh
Created December 20, 2012 14:00
Show Gist options
  • Save sendoa/4345459 to your computer and use it in GitHub Desktop.
Save sendoa/4345459 to your computer and use it in GitHub Desktop.
Script que comprueba si el archivo de proyecto tiene la config de CODE_SIGN_IDENTITY corrupta. http://stackoverflow.com/q/13962341/89035
# /bin/bash
#Usage: $ ./cs_xproj_validate.sh path/to/xcode/project/file/theproject.xcodeproj
#More info: http://stackoverflow.com/q/13962341/89035
PROJECT_FILE="$1/project.pbxproj"
PREVIOUS_LINE=-1
for LINE in `cat "$PROJECT_FILE" | grep -n CODE_SIGN_IDENTITY | grep -o -E '^([0-9]*)'`
do
TEMP=`expr $PREVIOUS_LINE + 1`
if [ $TEMP -eq $LINE ] ; then
echo "There is a Code Signing Identity (CODE_SIGN_IDENTITY) issue in $PROJECT_FILE at line $PREVIOUS_LINE."
exit 1
fi
PREVIOUS_LINE=$LINE
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment