• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/support/download/cvs
Yann E. MORINYann E. MORIN committed 3f2bdd0701d07 Dec 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
#!/usr/bin/env bash
2
​
3
# We want to catch any unexpected failure, and exit immediately
4
set -e
5
​
6
# Download helper for cvs, to be called from the download wrapper script
7
#
8
# Call it as:
9
#   .../cvs [-q] OUT_FILE CVS_URL REV PKG_NAME BASENAME
10
#
11
# Environment:
12
#   CVS      : the cvs command to call
13
​
14
verbose=
15
while getopts :q OPT; do
16
    case "${OPT}" in
17
    q)  verbose=-Q;;
18
    \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
19
    esac
20
done
21
shift $((OPTIND-1))
22
​
23
output="${1}"
24
repo="${2}"
25
rev="${3}"
26
rawname="${4}"
27
basename="${5}"
28
​
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)
31
_cvs() {
32
    eval ${CVS} "${@}"
33
}
34
​
35
if [[ ${rev} =~ ^[0-9] ]]; then
36
    # Date, because a tag or a branch cannot begin with a number
37
    select="-D"
38
else
39
    # Tag or branch
40
    select="-r"
41
fi
42
​
43
export TZ=UTC
44
_cvs ${verbose} -z3 -d"':pserver:anonymous@${repo}'" \
45
     co -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'"
46
​
47
tar czf "${output}" "${basename}"
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.