scripts/functions
changeset 2593 2472b2f24e3a
parent 2592 4908eb2b6f17
child 2594 b132d22c912a
     1.1 --- a/scripts/functions	Tue Aug 02 18:26:53 2011 +0200
     1.2 +++ b/scripts/functions	Tue Aug 02 23:11:25 2011 +0200
     1.3 @@ -513,7 +513,7 @@
     1.4  # Usage: CT_GetFile <basename> [.extension] <url> [url ...]
     1.5  CT_GetFile() {
     1.6      local ext
     1.7 -    local url URLS LAN_URLS
     1.8 +    local url URLS
     1.9      local file="$1"
    1.10      local first_ext
    1.11      shift
    1.12 @@ -532,23 +532,13 @@
    1.13      # Try to retrieve the file
    1.14      CT_DoLog EXTRA "Retrieving '${file}'"
    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          CT_TestOrAbort "Please set the mirror base URL" -n "${CT_MIRROR_BASE_URL}"
    1.22 -        LAN_URLS="${LAN_URLS} ${CT_MIRROR_BASE_URL}/${file%-*}"
    1.23 -        LAN_URLS="${LAN_URLS} ${CT_MIRROR_BASE_URL}"
    1.24 +        URLS="${CT_MIRROR_BASE_URL}/${file%-*} ${CT_MIRROR_BASE_URL}"
    1.25 +    fi
    1.26  
    1.27 -        if [ "${CT_PREFER_MIRROR}" = "y" ]; then
    1.28 -            CT_DoLog DEBUG "Pre-pending LAN mirror URLs"
    1.29 -            URLS="${LAN_URLS} ${URLS}"
    1.30 -        else
    1.31 -            CT_DoLog DEBUG "Appending LAN mirror URLs"
    1.32 -            URLS="${URLS} ${LAN_URLS}"
    1.33 -        fi
    1.34 -    fi
    1.35 +    URLS+="${URLS:+ }${*}"
    1.36  
    1.37      # Scan all URLs in turn, and try to grab a tarball from there
    1.38      # Do *not* try git trees (ext=/.git), this is handled in a specific