Use a ReaderT in TcDeriv to avoid some tedious plumbing
[ghc.git] / bindisttest / checkBinaries.sh
1 #!/bin/sh
2
3 EXPECTED_VERSION="$1"
4
5 # Our shared libraries are currently executable (is that a bug?), so
6 # we exclude anything that looks like a shared library
7 for f in `find bindisttest/a/b/c -type f -perm -u+x ! -name '*.so' ! -name '*.dylib' ! -name '*.dll'`
8 do
9 if grep -q '("GHC RTS", "YES")' "$f"
10 then
11 # Looks like a GHC executable. Is it for the right version?
12 THIS_VERSION=`./$f +RTS --info | grep '"GHC version"' | sed -e 's/^ ,("GHC version", "//' -e 's/")$//'`
13 if [ "$THIS_VERSION" != "$EXPECTED_VERSION" ]
14 then
15 echo "Bad GHC version '$THIS_VERSION' for '$f'" >&2
16 exit 1
17 fi
18 fi
19 done