summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rwxr-xr-xsupport/download/cvs27
1 files changed, 27 insertions, 0 deletions
diff --git a/support/download/cvs b/support/download/cvs
new file mode 100755
index 0000000000..60787a655e
--- /dev/null
+++ b/support/download/cvs
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# We want to catch any command failure, and exit immediately
+set -e
+
+# Download helper for cvs
+# Call it with:
+# $1: cvs repo
+# $2: cvs revision
+# $3: package's name (eg. foobar)
+# $4: package's basename (eg. foobar-1.2.3)
+# $5: output file
+# And this environment:
+# CVS : the cvs command to call
+# BR2_DL_DIR: path to Buildroot's download dir
+
+repo="${1}"
+rev="${2}"
+rawname="${3}"
+basename="${4}"
+output="${5}"
+
+cd "${BR2_DL_DIR}"
+${CVS} -z3 -d":pserver:anonymous@${repo}" \
+ co -d "${basename}" -r ":${rev}" -P "${rawname}"
+tar czf "${output}" "${basename}"
+rm -rf "${basename}"
OpenPOWER on IntegriCloud