Avoid common shell scripting pitfalls
[ghc.git] / build.sh
1 #!/usr/bin/env bash
2
3 set -euo pipefail
4
5 root="$(dirname "$0")"
6
7 mkdir -p "$root/.shake"
8
9 ghc \
10 "$root/src/Main.hs" \
11 -Wall \
12 -i"$root/src" \
13 -rtsopts \
14 -with-rtsopts=-I0 \
15 -outputdir="$root/.shake" \
16 -o "$root/.shake/build"
17
18 "$root/.shake/build" \
19 --lint \
20 --directory "$root/.." \
21 --colour \
22 "$@"