diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-08-02 11:57:47 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-08-02 11:57:55 +0100 |
commit | 47ae7ea1bb7af5ee3a1b391ff7bc0fe907b1094d (patch) | |
tree | f46f03c34ccf975842584b259fce61d2e9591995 | |
parent | 81a5a94da7091489a65781763995e8969591d8c3 (diff) | |
download | morph-47ae7ea1bb7af5ee3a1b391ff7bc0fe907b1094d.tar.gz |
Add check for #! in *.py files
We don't want to have any *.py files as executable scripts, so hashbangs
never make sense.
-rwxr-xr-x | check | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |