Thank you, segmentation_fault. I was making a joke (and talking of gentoo prefix on Max OS X).
I was actually coming back to suggest a change to bootstap-prefix.sh:
Instead of (lines 31 through 50):
Code:
efetch() {
if [[ ! -e ${DISTDIR}/${1##*/} ]] ; then
if [[ -z ${FETCH_COMMAND} ]] ; then
# Try to find a download manager, we only deal with wget,
# curl, FreeBSD's fetch and ftp.
if [[ x$(type -t wget) == "xfile" ]] ; then
FETCH_COMMAND="wget"
elif [[ x$(type -t ftp) == "xfile" ]] ; then
FETCH_COMMAND="ftp"
elif [[ x$(type -t curl) == "xfile" ]] ; then
einfo "WARNING: curl doesn't fail when downloading fails, please check its output carefully!"
FETCH_COMMAND="curl -L -O"
elif [[ x$(type -t fetch) == "xfile" ]] ; then
FETCH_COMMAND="fetch"
else
eerror "no suitable download manager found (need wget, curl, fetch or ftp)"
eerror "could not download ${1##*/}"
exit 1
fi
fi
I suggest the following:
Code:
efetch() {
if [[ ! -e ${DISTDIR}/${1##*/} ]] ; then
if [[ -z ${FETCH_COMMAND} ]] ; then
# Try to find a download manager, we only deal with wget,
# curl, FreeBSD's fetch and ftp.
if [[ "$(basename `which wget` 2> /dev/null)" == "wget" ]] ; then
FETCH_COMMAND=`which wget`
elif [[ "$(basename `which curl` 2> /dev/null)" == "curl" ]] ; then
einfo "WARNING: curl doesn't fail when downloading fails, please check its output carefully!"
FETCH_COMMAND="`which curl` -L -O"
elif [["$(basename `which ftp` 2> /dev/null)" == "ftp" ]] ; then
FETCH_COMMAND=`which ftp`
elif [[ "$(basename `which fetch` 2> /dev/null)" == "fetch" ]] ; then
FETCH_COMMAND=`which fetch`
else
eerror "no suitable download manager found (need wget, curl, fetch or ftp)"
eerror "could not download ${1##*/}"
exit 1
fi
fi
Note that ftp comes after curl which is installed by default.