]>
git.wh0rd.org - home.git/blob - .bin/cros-repo
5 Usage: repo-cros [options]
8 depot_tools clone depot_tools tree
9 int switch to internal tree
10 ext switch to external tree
11 -b <branch> switch branches (use "master" to get to ToT)
12 -r <path> patch to reference repo (e.g. ~/chromiumos/)
14 Operates on the repo in ${PWD}
20 printf '%s\n%s\n' "${PWD}" "$*"
24 email
="vapier@chromium.org"
29 while [[ $# -gt 0 ]] ; do
32 exec git clone https
://git.chromium.org
/chromium
/tools
/depot_tools.git
35 MANIFEST
='ssh://gerrit-int.chromium.org:29419/chromeos/manifest-internal.git'
36 REPO_URL
='https://git.chromium.org/git/external/repo.git'
39 MANIFEST
='https://git.chromium.org/git/chromiumos/manifest.git'
40 REPO_URL
='https://git.chromium.org/git/external/repo.git'
48 REF
=$
(realpath
"${2:-$(echo ~/chromiumos)}")
58 if [[ ${#BRANCH} -eq 3 ]] && [[ -d ${REF} ]] ; then
59 BRANCH
=$
(git
--git-dir="${REF}/.repo/manifests.git" branch
-a |
grep -o "release-${BRANCH}.*")
63 ${MANIFEST:+-u "${MANIFEST}"} \
64 ${REPO_URL:+--repo-url="${REPO_URL}"} \
65 ${REF:+--reference "${REF}"} \
66 ${BRANCH:+-b "${BRANCH}"}
68 rdir
=$
(realpath
"`pwd`")
69 while [[ ! -d ${rdir}/.repo
]] ; do
71 [[ ${rdir:-/} == "/" ]] && break
74 if [[ -d ${rdir} ]] ; then
75 gcfg
() { git
--git-dir="$1" config user.email
"${@:2}" ; }
76 if [[ $
(gcfg
"${rdir}/manifests.git") != "${email}" ]] ; then
77 echo "${rdir}: setting e-mail to ${email}"
78 find "${rdir}" -type d
-name '*.git' | \