Skip to content

Instantly share code, notes, and snippets.

@kini
Created July 25, 2014 18:25
Show Gist options
  • Save kini/d143d01a903138488bd9 to your computer and use it in GitHub Desktop.
Save kini/d143d01a903138488bd9 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -ex
PACKAGE="$1"
DEPENDENCY="$2"
TMPDIR="$(mktemp -d)"
pushd "$TMPDIR"
cabal get --pristine "$PACKAGE"
cd "$PACKAGE"*
cabal sandbox init
cabal install --only-dependencies --allow-newer="$DEPENDENCY"
cabal configure --allow-newer="$DEPENDENCY"
cabal build
cabal test
popd
rm -rf "$TMPDIR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment