install-all.sh: small rewrite
This commit is contained in:
parent
cb0fff5d8d
commit
55cd120d49
@ -1,20 +1,42 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash -e
|
||||||
|
|
||||||
CABAL=cabal
|
# allow a CABAL env var to override
|
||||||
|
CABAL=${CABAL:-cabal}
|
||||||
|
|
||||||
# install testing dependencies
|
# install testing dependencies
|
||||||
$CABAL install HUnit QuickCheck 'hspec >= 0.6.1 && < 0.7' shelltestrunner || exit 1
|
$CABAL install HUnit QuickCheck 'hspec >= 0.6.1 && < 0.7' shelltestrunner
|
||||||
|
|
||||||
git submodule init
|
# pull submodules
|
||||||
git submodule update
|
git submodule update --init
|
||||||
|
|
||||||
PACKAGES="blaze-textual aeson authenticate yesod-core yesod-json yesod-static yesod-persistent yesod-newsfeed yesod-form yesod-auth yesod-sitemap yesod"
|
pkgs=( blaze-textual
|
||||||
for package in $PACKAGES
|
aeson
|
||||||
do
|
authenticate
|
||||||
echo Installing $package
|
yesod-core
|
||||||
cd $package
|
yesod-json
|
||||||
($CABAL configure --enable-tests ||
|
yesod-static
|
||||||
($CABAL install --only-dependencies && $CABAL configure --enable-tests)
|
yesod-persistent
|
||||||
) && $CABAL build && $CABAL test && ./Setup.lhs install || exit 1
|
yesod-newsfeed
|
||||||
cd ..
|
yesod-form
|
||||||
|
yesod-auth
|
||||||
|
yesod-sitemap
|
||||||
|
yesod
|
||||||
|
)
|
||||||
|
|
||||||
|
# install each sub-respository
|
||||||
|
for pkg in "${pkgs[@]}"; do
|
||||||
|
echo "Installing $pkg..."
|
||||||
|
|
||||||
|
(
|
||||||
|
cd "./$pkg"
|
||||||
|
|
||||||
|
if ! $CABAL configure --enable-tests; then
|
||||||
|
$CABAL install --only-dependencies
|
||||||
|
$CABAL configure --enable-tests
|
||||||
|
fi
|
||||||
|
|
||||||
|
$CABAL build
|
||||||
|
$CABAL test
|
||||||
|
./Setup.lhs install
|
||||||
|
)
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user