Fix downloading with CT_GetFile when no mirror is set.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jan 31 13:15:18 2009 +0000 (2009-01-31)
changeset 1179619019337ead
parent 1178 41a84f7d3b4f
child 1180 734db80cc9b9
Fix downloading with CT_GetFile when no mirror is set.

/trunk/scripts/functions | 8 5 3 0 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
scripts/functions
     1.1 --- a/scripts/functions	Sat Jan 31 11:29:50 2009 +0000
     1.2 +++ b/scripts/functions	Sat Jan 31 13:15:18 2009 +0000
     1.3 @@ -478,7 +478,7 @@
     1.4  # Usage: CT_GetFile <basename> [.extension] <url> [url ...]
     1.5  CT_GetFile() {
     1.6      local ext
     1.7 -    local url
     1.8 +    local url URLS LAN_URLS
     1.9      local file="$1"
    1.10      local first_ext
    1.11      shift
    1.12 @@ -501,6 +501,8 @@
    1.13      CT_DoLog EXTRA "Retrieving '${file}'"
    1.14      CT_Pushd "${CT_TARBALLS_DIR}"
    1.15  
    1.16 +    URLS="$@"
    1.17 +
    1.18      # Add URLs on the LAN mirror
    1.19      LAN_URLS=
    1.20      if [ "${CT_USE_MIRROR}" = "y" ]; then
    1.21 @@ -511,10 +513,10 @@
    1.22  
    1.23          if [ "${CT_PREFER_MIRROR}" = "y" ]; then
    1.24              CT_DoLog DEBUG "Pre-pending LAN mirror URLs"
    1.25 -            URLS="${LAN_URLS} ${@}"
    1.26 +            URLS="${LAN_URLS} ${URLS}"
    1.27          else
    1.28              CT_DoLog DEBUG "Appending LAN mirror URLs"
    1.29 -            URLS="${@} ${LAN_URLS}"
    1.30 +            URLS="${URLS} ${LAN_URLS}"
    1.31          fi
    1.32      fi
    1.33