Ticket #358: bootstrap.sh.patch

File bootstrap.sh.patch, 2.4 KB (added by rnicholson, 4 years ago)
  • bootstrap.sh

    old new  
    22 
    33# A script to bootstrap cabal-install. 
    44 
    5 # It works by downloading and installing the Cabal, zlib and 
    6 # HTTP packages. It then installs cabal-install itself. 
     5# It works by downloading and installing the Cabal, zlib,  
     6# parsec, network, mtl and HTTP packages.  
     7# It then installs cabal-install itself. 
    78# It expects to be run inside the cabal-install directory. 
    89 
    910CABAL_VER="1.6.0.1" 
    1011HTTP_VER="3001.1.3" 
    1112ZLIB_VER="0.4.0.4" 
     13NETWORK_VER="2.2.0.1" 
     14PARSEC_VER="3.0.0" 
     15MTL_VER="1.1.0.2" 
    1216 
    1317HACKAGE_URL="http://hackage.haskell.org/packages/archive" 
    1418CABAL_URL=${HACKAGE_URL}/Cabal/${CABAL_VER}/Cabal-${CABAL_VER}.tar.gz 
    1519HTTP_URL=${HACKAGE_URL}/HTTP/${HTTP_VER}/HTTP-${HTTP_VER}.tar.gz 
    1620ZLIB_URL=${HACKAGE_URL}/zlib/${ZLIB_VER}/zlib-${ZLIB_VER}.tar.gz 
     21NETWORK_URL=${HACKAGE_URL}/network/${NETWORK_VER}/network-${NETWORK_VER}.tar.gz 
     22PARSEC_URL=${HACKAGE_URL}/parsec/${PARSEC_VER}/parsec-${PARSEC_VER}.tar.gz 
     23MTL_URL=${HACKAGE_URL}/mtl/${MTL_VER}/mtl-${MTL_VER}.tar.gz 
    1724 
    1825case `which wget curl` in 
    1926  *curl) 
    20     curl -O ${CABAL_URL} -O ${HTTP_URL} -O ${ZLIB_URL} 
     27    curl -O ${CABAL_URL} -O ${HTTP_URL} -O ${ZLIB_URL} -O ${MTL_URL} -O ${PARSEC_URL} -O ${NETWORK_URL} 
    2128    ;; 
    2229  *wget) 
    23     wget -c ${CABAL_URL} ${HTTP_URL} ${ZLIB_URL} 
     30    wget -c ${CABAL_URL} ${HTTP_URL} ${ZLIB_URL} -O ${MTL_URL} -O ${PARSEC_URL} -O ${NETWORK_URL} 
    2431    ;; 
    2532  *) 
    2633    echo "Failed to find a downloader. 'wget' or 'curl' is required." >&2 
     
    3441./Setup configure --user && ./Setup build && ./Setup install 
    3542cd .. 
    3643 
     44tar -zxf mtl-${MTL_VER}.tar.gz 
     45cd mtl-${MTL_VER} 
     46runghc Setup configure --user && runghc Setup build && runghc Setup install 
     47cd .. 
     48 
     49tar -zxf parsec-${PARSEC_VER}.tar.gz 
     50cd parsec-${PARSEC_VER} 
     51runghc Setup configure --user && runghc Setup build && runghc Setup install 
     52cd .. 
     53 
     54tar -zxf network-${NETWORK_VER}.tar.gz 
     55cd network-${NETWORK_VER} 
     56runghc Setup configure --user && runghc Setup build && runghc Setup install 
     57cd .. 
     58 
    3759tar -zxf HTTP-${HTTP_VER}.tar.gz 
    3860cd HTTP-${HTTP_VER} 
    3961runghc Setup configure --user && runghc Setup build && runghc Setup install 
     
    4466runghc Setup configure --user && runghc Setup build && runghc Setup install 
    4567cd .. 
    4668 
     69 
    4770runghc Setup configure --user && runghc Setup build && runghc Setup install 
    4871 
    4972CABAL_BIN="$HOME/.cabal/bin"