projects
/
summon-arm-toolchain.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
441a9af
)
automatically find a download program to use
author
Matthias Rampke
<matthias@rampke.de>
Sat, 13 Aug 2011 19:24:14 +0000
(21:24 +0200)
committer
Matthias Rampke
<matthias@rampke.de>
Sat, 13 Aug 2011 19:24:14 +0000
(21:24 +0200)
summon-arm-toolchain
patch
|
blob
|
history
diff --git
a/summon-arm-toolchain
b/summon-arm-toolchain
index f6826da7ac599c6bff11b6c194b078017927c517..cbf50c11f6e743b62176080dd8ef471bf7543b80 100755
(executable)
--- a/
summon-arm-toolchain
+++ b/
summon-arm-toolchain
@@
-105,9
+105,15
@@
STAMPS=${SUMMON_DIR}/stamps
# Detects which tools and flags to use
##############################################################################
# Detects which tools and flags to use
##############################################################################
-if ! which wget > /dev/null; then
- echo "Please install wget"
- exit 1
+# normalized fetching with whatever we can find
+if which fetch > /dev/null; then
+ FETCHCMD="fetch -p"
+elif which wget > /dev/null; then
+ FETCHCMD=wget
+elif which curl > /dev/null; then
+ FETCHCMD="curl -O"
+else
+ FETCHCMD=ftp # the only HTTP client on some BSD
fi
if [ USE_LINARO = 1 ]; then
fi
if [ USE_LINARO = 1 ]; then
@@
-131,7
+137,7
@@
fi
fetch() {
if [ ! -e ${STAMPS}/$1.fetch ]; then
log "Downloading $1 sources..."
fetch() {
if [ ! -e ${STAMPS}/$1.fetch ]; then
log "Downloading $1 sources..."
-
wget -c
$2
+
${FETCHCMD}
$2
touch ${STAMPS}/$1.fetch
fi
}
touch ${STAMPS}/$1.fetch
fi
}