check-all: Look for any shebang containing 'python'

Such as #!/usr/bin/env python

(imported from commit bc3ebdb3bafc9a6256a32c435a52717559bce82b)
This commit is contained in:
Keegan McAllister 2012-10-25 14:52:36 -04:00
parent 8c4a834206
commit a01d641b2a
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ cd "$SCRIPT_DIR"/..;
PYTHON_FILES=""
for file in $(git ls-files); do
if ([ -f "$file" ] && (head -n1 "$file" | grep -q "^#!/usr/bin/python" ||
if ([ -f "$file" ] && (head -n1 "$file" | grep -q "^#!.*python" ||
echo "$file" | grep -q [.]py$) && \
echo "$file" | egrep -vq '^(confirmation/|humbug/test_settings\.py)'); then
PYTHON_FILES="$PYTHON_FILES $file"