Skip to content

Commit

Permalink
updating dependencies in bootstrap.sh
Browse files Browse the repository at this point in the history
Thanks to Tuncer Ayaz.
  • Loading branch information
kosmikus committed Jan 10, 2012
1 parent a831a44 commit f80b86d
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions cabal-install/bootstrap.sh
Expand Up @@ -46,14 +46,16 @@ done

# Versions of the packages to install.
# The version regex says what existing installed versions are ok.
PARSEC_VER="3.1.1"; PARSEC_VER_REGEXP="[23]\." # == 2.* || == 3.*
NETWORK_VER="2.3.0.2"; NETWORK_VER_REGEXP="2\." # == 2.*
CABAL_VER="1.10.1.0"; CABAL_VER_REGEXP="1\.10\.[^0]" # == 1.10.* && >= 1.10.1
PARSEC_VER="3.1.2"; PARSEC_VER_REGEXP="[23]\." # == 2.* || == 3.*
TEXT_VER="0.11.1.12"; TEXT_VER_REGEXP="0\.([2-9]|(1[0-1]))\." # >= 0.2 && < 0.12
NETWORK_VER="2.3.0.8"; NETWORK_VER_REGEXP="2\." # == 2.*
CABAL_VER="1.14.0"; CABAL_VER_REGEXP="1\.(13\.3|14\.)" # >= 1.13.3 && < 1.15
TRANS_VER="0.2.2.0"; TRANS_VER_REGEXP="0\.2\." # == 0.2.*
MTL_VER="2.0.1.0"; MTL_VER_REGEXP="[12]\." # == 1.* || == 2.*
HTTP_VER="4000.1.1"; HTTP_VER_REGEXP="4000\.[01]\." # == 4000.0.* || 4000.1.*
ZLIB_VER="0.5.3.1"; ZLIB_VER_REGEXP="0\.[45]\." # == 0.4.* || ==0.5.*
TIME_VER="1.2.0.4" TIME_VER_REGEXP="1\.[12]\." # == 0.1.* || ==0.2.*
HTTP_VER="4000.2.2"; HTTP_VER_REGEXP="4000\.[012]\." # == 4000.0.* || 4000.1.* || 4000.2.*
ZLIB_VER="0.5.3.1"; ZLIB_VER_REGEXP="0\.[45]\." # == 0.4.* || == 0.5.*
TIME_VER="1.4" TIME_VER_REGEXP="1\.[1234]\.?" # >= 1.1 && < 1.5
RANDOM_VER="1.0.1.1" RANDOM_VER_REGEXP="1\.0\." # >= 1 && < 1.1

HACKAGE_URL="http://hackage.haskell.org/packages/archive"

Expand Down Expand Up @@ -86,7 +88,7 @@ ${GHC_PKG} list --global ${SCOPE_OF_INSTALLATION} > ghc-pkg.list \
need_pkg () {
PKG=$1
VER_MATCH=$2
if grep " ${PKG}-${VER_MATCH}" ghc-pkg.list > /dev/null 2>&1
if egrep " ${PKG}-${VER_MATCH}" ghc-pkg.list > /dev/null 2>&1
then
return 1;
else
Expand Down Expand Up @@ -186,20 +188,24 @@ do_pkg () {
info_pkg "Cabal" ${CABAL_VER} ${CABAL_VER_REGEXP}
info_pkg "transformers" ${TRANS_VER} ${TRANS_VER_REGEXP}
info_pkg "mtl" ${MTL_VER} ${MTL_VER_REGEXP}
info_pkg "text" ${TEXT_VER} ${TEXT_VER_REGEXP}
info_pkg "parsec" ${PARSEC_VER} ${PARSEC_VER_REGEXP}
info_pkg "network" ${NETWORK_VER} ${NETWORK_VER_REGEXP}
info_pkg "time" ${TIME_VER} ${TIME_VER_REGEXP}
info_pkg "HTTP" ${HTTP_VER} ${HTTP_VER_REGEXP}
info_pkg "zlib" ${ZLIB_VER} ${ZLIB_VER_REGEXP}
info_pkg "random" ${RANDOM_VER} ${RANDOM_VER_REGEXP}

do_pkg "Cabal" ${CABAL_VER} ${CABAL_VER_REGEXP}
do_pkg "transformers" ${TRANS_VER} ${TRANS_VER_REGEXP}
do_pkg "mtl" ${MTL_VER} ${MTL_VER_REGEXP}
do_pkg "text" ${TEXT_VER} ${TEXT_VER_REGEXP}
do_pkg "parsec" ${PARSEC_VER} ${PARSEC_VER_REGEXP}
do_pkg "network" ${NETWORK_VER} ${NETWORK_VER_REGEXP}
do_pkg "time" ${TIME_VER} ${TIME_VER_REGEXP}
do_pkg "HTTP" ${HTTP_VER} ${HTTP_VER_REGEXP}
do_pkg "zlib" ${ZLIB_VER} ${ZLIB_VER_REGEXP}
do_pkg "random" ${RANDOM_VER} ${RANDOM_VER_REGEXP}

install_pkg "cabal-install"

Expand Down

0 comments on commit f80b86d

Please sign in to comment.