forked from nick8325/quickcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-all
More file actions
executable file
·62 lines (52 loc) · 1.08 KB
/
build-all
File metadata and controls
executable file
·62 lines (52 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/zsh
set -e
sudo true
last-word() {
last=
for i in $*; do
last=$i
done
print $last
}
install-ghc() {
ver=${1/ghc-/}
print "===> GHC v$ver"
sudo stow -d /opt -t /usr/local $1
rehash
if [[ $(last-word $(ghc --version)) != $ver ]]; then
print 'Version mismatch!'
exit 1
fi
}
remove-ghc() {
sudo stow -d /opt -t /usr/local -D $1
rehash
print
}
find-package() {
last-word $(sed '/using$/{N;s/\n/ /}' log|grep "using $1")
}
run-cabal() {
rm -rf dist
if cabal install -v --reinstall --force-reinstalls --disable-library-profiling $* >& log; then
print "OK, $(find-package base) $(find-package extensible-exceptions)"
else
print 'Failed!'
fi
}
build-quickcheck() {
print -n "Base-4: "
run-cabal -fbase4
print -n "Base-3: "
run-cabal -f-base4
print -n "No options: "
run-cabal
}
for i in /opt/ghc-*; do
ghc=$(basename $i)
install-ghc $ghc
build-quickcheck
remove-ghc $ghc
done
print "===> System GHC: v$(last-word $(ghc --version))"
build-quickcheck