3 # We want to catch any unexpected failure, and exit immediately
6 # Download helper for cvs, to be called from the download wrapper script
9 # .../cvs [-q] OUT_FILE CVS_URL REV PKG_NAME BASENAME
12 # CVS : the cvs command to call
15 while getopts :q OPT
; do
18 \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
29 # Caller needs to single-quote its arguments to prevent them from
30 # being expanded a second time (in case there are spaces in them)
35 if [[ ${rev} =~ ^
[0-9] ]]; then
36 # Date, because a tag or a branch cannot begin with a number
43 # The absence of an initial : on ${repo} means access method undefined
44 if [[ ! "${repo}" =~ ^
: ]]; then
45 # defaults to anonymous pserver
46 repo
=":pserver:anonymous@${repo}"
50 _cvs
${verbose} -z3 -d"'${repo}'" \
51 co
-d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'"
53 tar czf
"${output}" "${basename}"