Fixed incorrect errors on [[ $1 ]]

This commit is contained in:
Vidar Holen
2012-11-16 21:01:26 -08:00
parent 19a7698785
commit 89b0168254
2 changed files with 60 additions and 23 deletions

View File

@@ -2,11 +2,12 @@
# Todo: Find a way to make this not suck.
[[ -e test/quackCheck.hs ]] || { echo "Are you running me from the wrong directory?"; exit 1; }
[[ $1 == -v ]] && pattern="" || pattern="FAIL"
find . -name '*.hs' -exec bash -c '
grep -v "^module " "$1" > quack.tmp.hs
./test/quackCheck.hs +names quack.tmp.hs
' -- {} \; 2>&1 | grep -i FAIL
' -- {} \; 2>&1 | grep -i "$pattern"
result=$?
rm -f quack.tmp.hs hugsin