summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-08-02 16:26:53 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-08-02 16:26:53 (GMT)
commitcba626981033b209266dfe19538f3e6edb0e63a3 (patch)
treeb530e23d858ed0a238bdb0ea204cfea67fd1b3cd /scripts/functions
parentf7a05d343a937f6d1262340d54cf4558544a689f (diff)
scripts/functions: cvs retrieval first tries the mirror for tarballs
The cvs download helper looks for the local tarballs dir to see if it can find a pre-downloaded tarball, and if it does not find it, does the actual fetch to upstream via cvs. In the process, it does not even try to get a tarball from the local mirror, which can be useful if the mirror has been pre-populated manually (or with a previously downloaded tree). Fake a tarball get with the standard tarball-download helper, but without specifying any upstream URL, which makes the helper directly try the LAN mirror. Of course, if no mirror is specified, no URL wil be available, and the standard cvs retrieval will kick in. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/functions b/scripts/functions
index c80eecd..42c456c 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -590,11 +590,11 @@ CT_GetCVS() {
local dirname="$5"
local tmp_dir
- # Does it exist localy?
- CT_GetLocal "${basename}" && return 0 || true
- # No, it does not...
-
- CT_DoLog EXTRA "Retrieving '${basename}'"
+ # First try locally, then the mirror
+ if CT_GetFile "${basename}"; then
+ # Got it! Return early! :-)
+ return 0
+ fi
CT_MktempDir tmp_dir
CT_Pushd "${tmp_dir}"