From 47ae7ea1bb7af5ee3a1b391ff7bc0fe907b1094d Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 2 Aug 2012 11:57:47 +0100 Subject: Add check for #! in *.py files We don't want to have any *.py files as executable scripts, so hashbangs never make sense. --- check | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'check') diff --git a/check b/check index 660c8cf4..b9ed2d56 100755 --- a/check +++ b/check @@ -58,6 +58,16 @@ then fi ;; esac + + case "$x" in + *.py) + if head -1 "$x" | grep '^#!' > /dev/null + then + echo "ERROR: $x has a hashbang" 1>&2 + errors=1 + fi + ;; + esac done fi exit $errors -- cgit v1.2.1