Fork 0

grafthistory: support curl

Mac OS X comes with curl (in the com.apple.pkg.BSD package)
but not with wget.
This commit is contained in:
Kalle Olavi Niemitalo 2008-07-02 16:04:54 +03:00 committed by Kalle Olavi Niemitalo
parent 45f237a26c
commit 14cb43f403
1 changed files with 8 additions and 4 deletions

View File

@ -4,8 +4,12 @@
# Note that this will download about 80M.
if [ -z "`which wget 2>/dev/null`" ]; then
echo "Error: You need to have wget installed so that I can fetch the history." >&2
if [ -n "`which wget 2>/dev/null`" ]; then
downloader="wget -c"
elif [ -n "`which curl 2>/dev/null`" ]; then
downloader="curl -C - -O"
echo "Error: You need to have wget or curl installed so that I can fetch the history." >&2
exit 1
@ -24,8 +28,8 @@ echo "ELinks history converted from CVS. Keep this pack separate to speed up gi
# pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.idx is 3163784 bytes long.
# Downloading it takes less than 6 seconds here, whereas generating it
# with git index-pack takes over 4 minutes (750 MHz Duron, git
wget -c http://elinks.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.idx
wget -c http://elinks.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.pack
$downloader http://elinks.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.idx
$downloader http://elinks.cz/elinks-history.git/objects/pack/pack-0d6c5c67aab3b9d5d9b245da5929c15d79124a48.pack
echo "[grafthistory] Setting up the grafts"
cd ../..