summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-11-25 19:36:04 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-11-25 19:36:04 (GMT)
commit135ea6486fc3f4edcc81c6fdf7b65a50a2a3ebdc (patch)
tree9df9f95ec6ff0cfee261ce9378a3db8150333020 /scripts
parent27199362d543e8eba80faca1b4d67fc8b75eaa5f (diff)
scripts/functions: do not double check if downloads are allowed
Only call the *_get functions if downloads are allowed, so there is no need to check it again in the retrieval wrappers.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/crosstool-NG.sh.in30
-rw-r--r--scripts/functions9
2 files changed, 17 insertions, 22 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index b42b187..ffe16f1 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -489,19 +489,23 @@ if [ -z "${CT_RESTART}" ]; then
fi
if [ -z "${CT_RESTART}" ]; then
- CT_DoStep INFO "Retrieving needed toolchain components' tarballs"
- do_kernel_get
- do_gmp_get
- do_mpfr_get
- do_ppl_get
- do_cloog_get
- do_mpc_get
- do_binutils_get
- do_cc_get
- do_libc_get
- do_tools_get
- do_debug_get
- CT_EndStep
+ if [ "${CT_FORBID_DOWNLOAD}" = "y" ]; then
+ CT_DoLog INFO "Downloading forbidden by configuration, skipping downloads"
+ else
+ CT_DoStep INFO "Retrieving needed toolchain components' tarballs"
+ do_kernel_get
+ do_gmp_get
+ do_mpfr_get
+ do_ppl_get
+ do_cloog_get
+ do_mpc_get
+ do_binutils_get
+ do_cc_get
+ do_libc_get
+ do_tools_get
+ do_debug_get
+ CT_EndStep
+ fi
if [ "${CT_ONLY_DOWNLOAD}" != "y" ]; then
if [ "${CT_FORCE_EXTRACT}" = "y" ]; then
diff --git a/scripts/functions b/scripts/functions
index 65e3f27..bc71ea1 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -448,9 +448,6 @@ CT_GetFile() {
CT_GetLocal "${file}" ${first_ext} && return 0 || true
# No, it does not...
- # Are downloads allowed ?
- CT_TestAndAbort "File '${file}' not present locally, and downloads are not allowed" "${CT_FORBID_DOWNLOAD}" = "y"
-
# Try to retrieve the file
CT_DoLog EXTRA "Retrieving '${file}'"
CT_Pushd "${CT_TARBALLS_DIR}"
@@ -512,9 +509,6 @@ CT_GetCVS() {
CT_GetLocal "${basename}" && return 0 || true
# No, it does not...
- # Are downloads allowed ?
- CT_TestAndAbort "File '${basename}' not present locally, and downloads are not allowed" "${CT_FORBID_DOWNLOAD}" = "y"
-
CT_DoLog EXTRA "Retrieving '${basename}'"
CT_MktempDir tmp_dir
@@ -554,9 +548,6 @@ CT_GetSVN() {
CT_GetLocal "${basename}" && return 0 || true
# No, it does not...
- # Are downloads allowed ?
- CT_TestAndAbort "File '${basename}' not present locally, and downloads are not allowed" "${CT_FORBID_DOWNLOAD}" = "y"
-
CT_DoLog EXTRA "Retrieving '${basename}'"
CT_MktempDir tmp_dir