[commit: Cabal] master: Add support for BSD fetch to bootstrap script (c756def)
Ian Lynagh
igloo at earth.li
Fri Jun 24 02:08:07 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/c756defe6ef43fa01b370e8c1e541acb7a44b251
>---------------------------------------------------------------
commit c756defe6ef43fa01b370e8c1e541acb7a44b251
Author: Duncan Coutts <duncan at community.haskell.org>
Date: Sun Feb 27 15:24:23 2011 +0000
Add support for BSD fetch to bootstrap script
On FreeBSD fetch is installed by default, unlike wget or curl.
>---------------------------------------------------------------
cabal-install/bootstrap.sh | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/cabal-install/bootstrap.sh b/cabal-install/bootstrap.sh
index ecacd73..ddcb1a3 100644
--- a/cabal-install/bootstrap.sh
+++ b/cabal-install/bootstrap.sh
@@ -16,6 +16,7 @@ GHC=${GHC:-ghc}
GHC_PKG=${GHC_PKG:-ghc-pkg}
WGET=${WGET:-wget}
CURL=${CURL:-curl}
+FETCH=${FETCH:-fetch}
TAR=${TAR:-tar}
GUNZIP=${GUNZIP:-gunzip}
SCOPE_OF_INSTALLATION="--user"
@@ -134,8 +135,11 @@ fetch_pkg () {
elif which ${WGET} > /dev/null
then
${WGET} -c ${URL} || die "Failed to download ${PKG}."
+ elif which ${FETCH} > /dev/null
+ then
+ ${FETCH} ${URL} || die "Failed to download ${PKG}."
else
- die "Failed to find a downloader. 'wget' or 'curl' is required."
+ die "Failed to find a downloader. 'curl', 'wget' or 'fetch' is required."
fi
[ -f "${PKG}-${VER}.tar.gz" ] \
|| die "Downloading ${URL} did not create ${PKG}-${VER}.tar.gz"
More information about the Cvs-libraries
mailing list