Fix Git hook to actually trip when only a single match is found
parent
91bd653b55
commit
63e10bcb77
|
@ -1,9 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
ERRORS=$(grep -nR --include project.pbxproj -E "(DevelopmentTeam|DEVELOPMENT_TEAM) =" . | grep -v -E '= ""')
|
||||
COUNT=$(echo -n "$ERRORS\c" | wc -l | awk '{print $1}')
|
||||
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";
|
||||
|
|
Loading…
Reference in New Issue