Created
January 4, 2015 16:13
-
-
Save jsl/20c632557f6273d938b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
GHC_VERSION_STRING=`ghc --version 2> /dev/null` | |
if [ $? -ne 0 ] | |
then | |
echo "Unable to obtain GHC version!" | |
exit 1 | |
fi | |
+GHC_VERSION=`echo ${GHC_VERSION_STRING} | perl -n -e'/version (\d+\.\d+.\d+)/ && print $1'` | |
echo "executable: call-haskell-from-anything.so" > call-haskell-from-anything.buildinfo | |
echo "extra-libraries: HSrts-ghc${GHC_VERSION}" >> call-haskell-from-anything.buildinfo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
ghc --numeric-version
to avaoid theperl
ing.