fidian / git-started

A good starting point for projects. Sets up lint checking, pretty printing. Easily extensible.
Other
6 stars 4 forks source link

Check Shell Scripts #8

Closed fidian closed 10 years ago

fidian commented 11 years ago

You can run a linter with bash and possibly others.

head -n 1 "${file}" | grep 'bash' | grep '^#!/' > /dev/null
if [ "$?" -eq 0 ] ; then
set -e
bash -n "${file}"
set +e
fi
fidian commented 10 years ago

It's in!