Ticket #358: bootstrap.sh.patch
| File bootstrap.sh.patch, 2.4 KB (added by rnicholson, 4 years ago) |
|---|
-
bootstrap.sh
old new 2 2 3 3 # A script to bootstrap cabal-install. 4 4 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. 7 8 # It expects to be run inside the cabal-install directory. 8 9 9 10 CABAL_VER="1.6.0.1" 10 11 HTTP_VER="3001.1.3" 11 12 ZLIB_VER="0.4.0.4" 13 NETWORK_VER="2.2.0.1" 14 PARSEC_VER="3.0.0" 15 MTL_VER="1.1.0.2" 12 16 13 17 HACKAGE_URL="http://hackage.haskell.org/packages/archive" 14 18 CABAL_URL=${HACKAGE_URL}/Cabal/${CABAL_VER}/Cabal-${CABAL_VER}.tar.gz 15 19 HTTP_URL=${HACKAGE_URL}/HTTP/${HTTP_VER}/HTTP-${HTTP_VER}.tar.gz 16 20 ZLIB_URL=${HACKAGE_URL}/zlib/${ZLIB_VER}/zlib-${ZLIB_VER}.tar.gz 21 NETWORK_URL=${HACKAGE_URL}/network/${NETWORK_VER}/network-${NETWORK_VER}.tar.gz 22 PARSEC_URL=${HACKAGE_URL}/parsec/${PARSEC_VER}/parsec-${PARSEC_VER}.tar.gz 23 MTL_URL=${HACKAGE_URL}/mtl/${MTL_VER}/mtl-${MTL_VER}.tar.gz 17 24 18 25 case `which wget curl` in 19 26 *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} 21 28 ;; 22 29 *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} 24 31 ;; 25 32 *) 26 33 echo "Failed to find a downloader. 'wget' or 'curl' is required." >&2 … … 34 41 ./Setup configure --user && ./Setup build && ./Setup install 35 42 cd .. 36 43 44 tar -zxf mtl-${MTL_VER}.tar.gz 45 cd mtl-${MTL_VER} 46 runghc Setup configure --user && runghc Setup build && runghc Setup install 47 cd .. 48 49 tar -zxf parsec-${PARSEC_VER}.tar.gz 50 cd parsec-${PARSEC_VER} 51 runghc Setup configure --user && runghc Setup build && runghc Setup install 52 cd .. 53 54 tar -zxf network-${NETWORK_VER}.tar.gz 55 cd network-${NETWORK_VER} 56 runghc Setup configure --user && runghc Setup build && runghc Setup install 57 cd .. 58 37 59 tar -zxf HTTP-${HTTP_VER}.tar.gz 38 60 cd HTTP-${HTTP_VER} 39 61 runghc Setup configure --user && runghc Setup build && runghc Setup install … … 44 66 runghc Setup configure --user && runghc Setup build && runghc Setup install 45 67 cd .. 46 68 69 47 70 runghc Setup configure --user && runghc Setup build && runghc Setup install 48 71 49 72 CABAL_BIN="$HOME/.cabal/bin"
