summaryrefslogtreecommitdiffstats
path: root/quickrun
blob: e0e0547ce2b4350f9b88b1aab59fb3261b232b48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash
# quickrun runs ShellCheck in an interpreted mode.
# This allows testing changes without recompiling.

path=$(find . -type f -path './dist*/Paths_ShellCheck.hs' | sort | head -n 1)
if [ -z "$path" ]
then
  echo >&2 "Unable to find Paths_ShellCheck.hs. Please 'cabal build' once."
  exit 1
fi
path="${path%/*}"

exec runghc -isrc -i"$path" shellcheck.hs "$@"