From 3c5593c8124401dae7b1dd2bbe7c9379e70cfd63 Mon Sep 17 00:00:00 2001 From: Thomas Levine <_@thomaslevine.com> Date: Thu, 31 Mar 2016 19:06:23 +0000 Subject: [PATCH] fix has_shebang_line --- tests/Internals/has_shebang_line | 10 ++++++++++ urchin | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/Internals/has_shebang_line b/tests/Internals/has_shebang_line index c9bd466..d18ee8f 100755 --- a/tests/Internals/has_shebang_line +++ b/tests/Internals/has_shebang_line @@ -8,3 +8,13 @@ has_shebang_line $tmp echo '!#/usr/bin/env true' > $tmp has_shebang_line $tmp + +echo > $tmp +has_shebang_line $tmp + +echo ' + + + +' > $tmp +has_shebang_line $tmp diff --git a/urchin b/urchin index 6e6003f..f3dc0d9 100755 --- a/urchin +++ b/urchin @@ -414,7 +414,7 @@ report_outcome() { } 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]..."