[Yt-svn] commit/yt: MatthewTurk: Setting up a switch if wget can't be found, rather than defaulting to Curl.

Bitbucket commits-noreply at bitbucket.org
Tue Nov 8 08:03:25 PST 2011


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/f376abaf6942/
changeset:   f376abaf6942
branch:      yt
user:        MatthewTurk
date:        2011-11-08 17:03:04
summary:     Setting up a switch if wget can't be found, rather than defaulting to Curl.
affected #:  1 file

diff -r 2c1db459ba683764f2cb90421eeef32725679724 -r f376abaf6942d5050c42dc2a49f258fb60566ae5 doc/install_script.sh
--- a/doc/install_script.sh
+++ b/doc/install_script.sh
@@ -268,12 +268,21 @@
     cd ..
 }
 
+if type -P wget &>/dev/null 
+then
+    echo "Using wget"
+    export GETFILE="wget -nv"
+else
+    echo "Using curl"
+    export GETFILE="curl -sSO"
+fi
+
 function get_enzotools
 {
     echo "Downloading $1 from yt-project.org"
     [ -e $1 ] && return
-    curl -sSO "http://yt-project.org/dependencies/$1" || do_exit
-    curl -sSO "http://yt-project.org/dependencies/$1.md5" || do_exit
+    ${GETFILE} "http://yt-project.org/dependencies/$1" || do_exit
+    ${GETFILE} "http://yt-project.org/dependencies/$1.md5" || do_exit
     ( which md5sum &> /dev/null ) || return # return if we don't have md5sum
     ( md5sum -c $1.md5 2>&1 ) 1>> ${LOG_FILE} || do_exit
 }

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list