summaryrefslogtreecommitdiffstats
path: root/support/download/cvs
diff options
context:
space:
mode:
authorFabio Porcedda <fabio.porcedda@gmail.com>2015-05-06 14:17:48 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-10 11:09:20 +0200
commit6c0d6592f400a48150d7d4e068d110ca2ed903c1 (patch)
tree235ad8d240ae197a33d1bef21f10accb44dd3e36 /support/download/cvs
parent68152fea9b30a58c520c1501c0fdd33e13e16a1a (diff)
downloadbuildroot-6c0d6592f400a48150d7d4e068d110ca2ed903c1.tar.gz
buildroot-6c0d6592f400a48150d7d4e068d110ca2ed903c1.zip
support/download/cvs: add support to use a date instead of a tag
This is useful when a tag is not avaiable. Also fix support for Fedora where the command "cvs -r :<version>" doesn't work. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/download/cvs')
-rwxr-xr-xsupport/download/cvs11
1 files changed, 10 insertions, 1 deletions
diff --git a/support/download/cvs b/support/download/cvs
index 2c3a666d2e..bfac73b1f1 100755
--- a/support/download/cvs
+++ b/support/download/cvs
@@ -26,7 +26,16 @@ rev="${3}"
rawname="${4}"
basename="${5}"
+if [[ ${rev} =~ ^[0-9] ]]; then
+ # Date, because a tag or a branch cannot begin with a number
+ select="-D"
+else
+ # Tag or branch
+ select="-r"
+fi
+
+export TZ=UTC
${CVS} ${verbose} -z3 -d":pserver:anonymous@${repo}" \
- co -d "${basename}" -r ":${rev}" -P "${rawname}"
+ co -d "${basename}" ${select} "${rev}" -P "${rawname}"
tar czf "${output}" "${basename}"
OpenPOWER on IntegriCloud