#!/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