Fix the exit code of the script

This commit is contained in:
Laurent Rineau 2012-11-01 13:58:24 +00:00
parent 67b8c56fa3
commit e9637bf7b3
1 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
#/bin/bash
#!/bin/bash
if grep -lE '[^'`printf '\r'`']$' $(ack -l "`printf '\r'`\$" ${@:-.}); then
exit 1
else
exit 0
fi
grep -lE '[^'`printf '\r'`']$' $(ack -l "`printf '\r'`\$" ${@:-.})