do a cabal update just once

previously was doing it lazily, but multiple times
also install testing dependencies right away
This commit is contained in:
Greg Weber 2011-08-16 14:34:57 -07:00
parent 2e4eeca102
commit 971ab6ec74

View File

@ -2,13 +2,17 @@
CABAL=cabal
$CABAL update
# install testing dependencies
$CABAL install HUnit QuickCheck hspec
PACKAGES="yesod-core yesod-json yesod-static yesod-persistent yesod-newsfeed yesod-form yesod-auth yesod-sitemap yesod"
for package in $PACKAGES
do
echo Installing $package
cd $package
($CABAL configure --enable-tests ||
($CABAL update && $CABAL install HUnit QuickCheck hspec && $CABAL install --only-dependencies && $CABAL configure --enable-tests)
($CABAL install --only-dependencies && $CABAL configure --enable-tests)
) && $CABAL build && $CABAL test && ./Setup.lhs install || exit
cd ..
done