Skip to content
Snippets Groups Projects
Commit 1fae8771 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Allow use of curl in bootstrap.sh

Patch from jsnx. Fixes ticket #343. Also, use "cd blah; cd .."
instead of "pushd blah; popd" as some shells lack pushd/popd
parent 48d67503
No related branches found
No related merge requests found
......@@ -15,23 +15,34 @@ CABAL_URL=${HACKAGE_URL}/Cabal/${CABAL_VER}/Cabal-${CABAL_VER}.tar.gz
HTTP_URL=${HACKAGE_URL}/HTTP/${HTTP_VER}/HTTP-${HTTP_VER}.tar.gz
ZLIB_URL=${HACKAGE_URL}/zlib/${ZLIB_VER}/zlib-${ZLIB_VER}.tar.gz
wget ${CABAL_URL} ${HTTP_URL} ${ZLIB_URL}
case `which wget curl` in
*curl)
curl -O ${CABAL_URL} -O ${HTTP_URL} -O ${ZLIB_URL}
;;
*wget)
wget ${CABAL_URL} ${HTTP_URL} ${ZLIB_URL}
;;
*)
echo "Failed to find a downloader, 'wget' or 'curl' is required" >&2
exit 2
;;
esac
tar -zxf Cabal-${CABAL_VER}.tar.gz
pushd Cabal-${CABAL_VER}
cd Cabal-${CABAL_VER}
ghc --make Setup
./Setup configure --user && ./Setup build && ./Setup install
popd
cd ..
tar -zxf HTTP-${HTTP_VER}.tar.gz
pushd HTTP-${HTTP_VER}
cd HTTP-${HTTP_VER}
runghc Setup configure --user && runghc Setup build && runghc Setup install
popd
cd ..
tar -zxf zlib-${ZLIB_VER}.tar.gz
pushd zlib-${ZLIB_VER}
cd zlib-${ZLIB_VER}
runghc Setup configure --user && runghc Setup build && runghc Setup install
popd
cd ..
runghc Setup configure --user && runghc Setup build && runghc Setup install
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment