scripts/functions
changeset 2203 ac3e215141a1
parent 2155 5374ab57d331
child 2204 ea1c9143e1e3
     1.1 --- a/scripts/functions	Fri Oct 22 22:02:49 2010 +0200
     1.2 +++ b/scripts/functions	Tue Nov 16 10:00:27 2010 +0100
     1.3 @@ -383,31 +383,16 @@
     1.4      || rm -f "${1##*/}"
     1.5  }
     1.6  
     1.7 -# Download using aria2
     1.8 -# Usage: CT_DoGetFileAria2 <URL>
     1.9 -CT_DoGetFileAria2() {
    1.10 -    # Note: comments about curl method (above) are also valid here
    1.11 -    # Plus: default progress indicator is a single line, so use verbose log
    1.12 -    #       so that the CT-NG's ouput is 'live'.
    1.13 -    CT_DoExecLog ALL aria2c --summary-interval=1 -s ${CT_DOWNLOAD_MAX_CHUNKS} -m 3 -t ${CT_CONNECT_TIMEOUT} -p "$1" \
    1.14 -    || CT_DoExecLog ALL aria2c --summary-interval=1 -s ${CT_DOWNLOAD_MAX_CHUNKS} -m 3 -t ${CT_CONNECT_TIMEOUT} "$1" \
    1.15 -    || rm -f "${1##*/}"
    1.16 -}
    1.17 -
    1.18  # OK, just look if we have them...
    1.19 -_aria2c=$(CT_Which aria2c)
    1.20  _wget=$(CT_Which wget)
    1.21  _curl=$(CT_Which curl)
    1.22  
    1.23  # Wrapper function to call one of, in order of preference:
    1.24 -#   aria2
    1.25  #   curl
    1.26  #   wget
    1.27  # Usage: CT_DoGetFile <URL>
    1.28  CT_DoGetFile() {
    1.29 -    if   [ -n "${_aria2c}" -a ${CT_DOWNLOAD_MAX_CHUNKS} -gt 1 ]; then
    1.30 -        CT_DoGetFileAria2 "$1"
    1.31 -    elif [ -n "${_curl}" ]; then
    1.32 +    if   [ -n "${_curl}" ]; then
    1.33          CT_DoGetFileCurl "$1"
    1.34      elif [ -n "${_wget}" ]; then
    1.35          CT_DoGetFileWget "$1"