blob: cef3f4901ba2e310d1c7307b58cef2c545323eb0 [file] [log] [blame]
#!/usr/bin/env bash
# This file *stripped* all unit tests from ShellCheck, removing
# the dependency on QuickCheck and Template Haskell and
# reduces the binary size considerably.
#
# Currently it only checks that run from right directory and
# there aren't local git changes
set -o pipefail
if [[ ! -e ShellCheck.cabal ]]
then
echo "Run me from the ShellCheck directory." >&2
exit 1
fi
if [[ -d '.git' ]] && ! git diff --exit-code > /dev/null 2>&1
then
echo "You have local changes! These may be overwritten." >&2
exit 2
fi