summaryrefslogtreecommitdiff
path: root/support/download
diff options
context:
space:
mode:
authorJoao Mano <joao@datacom.ind.br>2016-01-15 18:13:15 -0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-01-20 23:26:03 +0100
commit4fad12598df593d58fa36d40a1002c4a3a130b7a (patch)
tree81f920e9a529685566db5a0bd5aaa5865379166a /support/download
parent544e2c5871f223facd1ab3c2853cd07ad70dd9d1 (diff)
support/download: alternative access methods to CVS
Allows user to specify other access methods than :pserver:anonymous@ on CVS repositories. This shall be defined in the <pkg>_SITE variable. [Thomas: - as suggested by Yann, quote the variable expansion - as suggested by Yann, use a regexp match - tweak commit log] Signed-off-by: Joao Mano <joao@datacom.ind.br> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/download')
-rwxr-xr-xsupport/download/cvs8
1 files changed, 7 insertions, 1 deletions
diff --git a/support/download/cvs b/support/download/cvs
index e1d5035c1..7980389a4 100755
--- a/support/download/cvs
+++ b/support/download/cvs
@@ -40,8 +40,14 @@ else
select="-r"
fi
+# The absence of an initial : on ${repo} means access method undefined
+if [[ ! "${repo}" =~ ^: ]]; then
+ # defaults to anonymous pserver
+ repo=":pserver:anonymous@${repo}"
+fi
+
export TZ=UTC
-_cvs ${verbose} -z3 -d"':pserver:anonymous@${repo}'" \
+_cvs ${verbose} -z3 -d"'${repo}'" \
co -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'"
tar czf "${output}" "${basename}"