on master help sign in
install-all.sh: small rewrite
commitd61ad466dfa9ec7ce3dbeb45123b3b36859d7753 authorpatrick brisbin <pbrisbin@gmail.com> dateSat 27 Aug 2011, 10:36 (15 years ago) parentd7f0dc0
1 file changed+31−12
install-all.sh+31−12
install-all.sh+31−12
@@ -1,17 +1,36 @@
1−#!/bin/sh
1+#!/bin/bash -e
22
3−CABAL=cabal
3+# allow a CABAL env var to override
4+CABAL=${CABAL:-cabal}
45
56# install testing dependencies
6−$CABAL install HUnit QuickCheck 'hspec >= 0.6.1 && < 0.7' || exit 1
7+$CABAL install HUnit QuickCheck 'hspec >= 0.6.1 && < 0.7'
8+
79# Note: Ignoring wai-handler-devel, wai-handler-webkit
8−PACKAGES="wai wai-test wai-extra warp wai-app-static wai-handler-fastcgi wai-handler-launch wai-handler-scgi warp-static"
9−for package in $PACKAGES
10−do
11− echo Installing $package
12− cd $package
13− ($CABAL configure --enable-tests ||
14− ($CABAL install --only-dependencies && $CABAL configure --enable-tests)
15− ) && $CABAL build && $CABAL test && ./Setup.lhs install || exit 1
16− cd ..
10+pkgs=( wai
11+ wai-test
12+ wai-extra
13+ warp
14+ wai-app-static
15+ wai-handler-fastcgi
16+ wai-handler-launch
17+ wai-handler-scgi
18+ warp-static
19+ )
20+
21+for pkg in "${pkgs[@]}"; do
22+ echo "Installing $pkg..."
23+
24+ (
25+ cd "./$pkg"
26+
27+ if ! $CABAL configure --enable-tests; then
28+ $CABAL install --only-dependencies
29+ $CABAL configure --enable-tests
30+ fi
31+
32+ $CABAL build
33+ $CABAL test
34+ ./Setup.lhs install
35+ )
1736done