cog/.githooks/pre-commit

13 lines
336 B
Bash
Executable File

#!/bin/sh
MATCHES=$(grep -nR --include project.pbxproj -E "(DevelopmentTeam|DEVELOPMENT_TEAM) =" .)
COUNT=$(echo -n "$MATCHES\c" | grep -cvE '= ""')
if [ $COUNT -ne 0 ]; then
ERRORS=$(echo -n "$MATCHES\c" | grep -vE '= ""')
echo $COUNT
echo "Remove Development Team specifications from project files:"
echo "$ERRORS";
exit 1;
fi