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