Created
January 8, 2017 11:03
-
-
Save phadej/fdd74f4b4b40dc0a758ca6192cd66e83 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/sh | |
DOCTESTVER=0.11.0 | |
ROOTDIR=$(pwd) | |
set -e | |
# Fetch source | |
if [ ! -d doctest-$DOCTESTVER ]; then | |
cabal get doctest-$DOCTESTVER | |
fi | |
# Compile doctest | |
cd doctest-$DOCTESTVER | |
cabal new-build -w $ROOTDIR/inplace/bin/ghc-stage2 doctest:exe:doctest | |
DOCTESTBIN=$(find $ROOTDIR/doctest-$DOCTESTVER/dist-newstyle -type f -name doctest) | |
# Run doctests | |
for hsfile in $(find $ROOTDIR/libraries/base -type f -name '*.hs'); do | |
if grep -q '$setup' $hsfile; then | |
echo $hsfile | |
$DOCTESTBIN $hsfile | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment