From 6a5b2ab1bb804551ce78dacb595db06d13474954 Mon Sep 17 00:00:00 2001 From: Clifford Wolf <clifford@clifford.at> Date: Tue, 6 Jul 2004 15:20:07 +0000 Subject: [PATCH] Clifford Wolf: Minor scripts/Download changes for new mirrors [2004070617191901329] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@3521 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/Download | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/Download b/scripts/Download index 735dca75d..54f9787c8 100755 --- a/scripts/Download +++ b/scripts/Download @@ -400,17 +400,12 @@ download_file() { # mirror="$( cat download/Mirror )" - if [ "$mirror" -a "$mirror" != "none" ] ; then + if [ -n "$mirror" -a "$mirror" != "none" -a -z "${bzfile##download/mirror/*}" ] ; then # try to use mirror - if ! download_file_now "!$mirror/${bzfile#download/}" $bzfile $bzfile; then - #FIXME: compatibility, can be removed sooner or later... - # Try old download format for remote file - if ! download_file_now "!$mirror/$repo${pkg:+/}$pkg/`basename $bzfile`" $bzfile $bzfile; then - # oops... so try direct (original URL) - echo "INFO: download from mirror failed, trying original URL." - download_file_now $location $gzfile $bzfile - fi + if ! download_file_now "!$mirror/${bzfile#download/mirror/}" $bzfile $bzfile; then + echo "INFO: download from mirror failed, trying original URL." + download_file_now $location $gzfile $bzfile else gzfile="$bzfile" fi