fix has_shebang_line

This commit is contained in:
Thomas Levine 2016-03-31 19:06:23 +00:00
parent ce9273abfc
commit 3c5593c812
2 changed files with 11 additions and 1 deletions

View File

@ -8,3 +8,13 @@ has_shebang_line $tmp
echo '!#/usr/bin/env true' > $tmp echo '!#/usr/bin/env true' > $tmp
has_shebang_line $tmp has_shebang_line $tmp
echo > $tmp
has_shebang_line $tmp
echo '
' > $tmp
has_shebang_line $tmp

2
urchin
View File

@ -414,7 +414,7 @@ report_outcome() {
} }
has_shebang_line() { has_shebang_line() {
head -n 1 "${1}" | grep -q -v '#!/bin/sh' | grep -q '^#!' head -n 1 "${1}" | grep -q -v '^#!/bin/sh'
} }
USAGE="usage: $0 [options]... [test file or directory]..." USAGE="usage: $0 [options]... [test file or directory]..."