summaryrefslogtreecommitdiffstats
path: root/support/download/cvs
diff options
context:
space:
mode:
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