aboutsummaryrefslogtreecommitdiff
path: root/bwrap-files/workdir/entry.sh
blob: ce66a8d66e86efb7e3541d432a6e68fd90d493da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
set -euo pipefail

cd "$(dirname "$0")"

ver=$(ghcup --offline list -t ghc -c installed -r 2>/dev/null | sed -n '/latest/ s/^ghc \([^ ]*\).*/\1/p')
if [[ -n $ver ]]; then
  versionargs=( --ghc "$ver" )  # if we can get "latest", take that
else
  versionargs=()  # just fall back to the currently "set" version
fi

ghcup --offline run "${versionargs[@]}" -- ghci Yahb2Defs.hs 2>&1

# vim: set sw=2 ts=8 et: