From 85c417d2721a310cc6d07accf8fa8fe246a14e79 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Wed, 24 Dec 2003 16:40:17 +0000 Subject: [PATCH] Alejandro Mery : detect mirror only when it will be used force config only when downloading requireds git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2054 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- Documentation/Developers/CHANGELOG-RENE | 1 + scripts/Download | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Documentation/Developers/CHANGELOG-RENE b/Documentation/Developers/CHANGELOG-RENE index 174db4a60..096a1fa44 100644 --- a/Documentation/Developers/CHANGELOG-RENE +++ b/Documentation/Developers/CHANGELOG-RENE @@ -3,6 +3,7 @@ - implemented kiss' mount '-r' options and added a remount option ('-R') - updated rockplug (0.0.6) + - Alejandro Mery: fixed scripts/Download to not always require a config *) 2003-12-23 (2.0.0-rc3 - 2.0.0-rc4) diff --git a/scripts/Download b/scripts/Download index 24b4e01ee..c458b220e 100755 --- a/scripts/Download +++ b/scripts/Download @@ -234,14 +234,6 @@ cksum_chk() { return 0 } -# Choosen config must exist -# -if [ ! -f config/$config/packages ]; then - echo "ERROR: Config $config doesn't exist." - echo "ERROR: try ./scripts/Config -cfg $config first." - exit 1 -fi - # Autodetect best Mirror and safe url in $mirror # detect_mirror() { @@ -749,6 +741,14 @@ repository() { } required() { + # Choosen config must exist + # + if [ ! -f config/$config/packages ]; then + echo "ERROR: Config $config doesn't exist." + echo "ERROR: try ./scripts/Config -cfg $config first." + exit 1 + fi + while read on a b tree pkg c ; do if [ "$on" = "X" ] ; then grep -H '^\[D\] ' package/$tree/$pkg/$pkg.desc > src/down.$$.lst @@ -788,7 +788,7 @@ all() { # Do mirror detection only once # -if [ $this_is_the_2nd_run = 0 ]; then +if [ $this_is_the_2nd_run = 0 -a "${1:0:5}" != "-list" -a $checkonly = 0 ]; then detect_mirror fi