]>
git.wh0rd.org - home.git/blob - .bin/cros-repo
c03020b35725f139e0835e183a27ca53e323594d
5 Usage: repo-cros [options]
8 int switch to internal tree
9 ext switch to external tree
10 -b <branch> switch branches (use "master" to get to ToT)
11 -r <path> patch to reference repo (e.g. ~/chromiumos/)
13 Operates on the repo in ${PWD}
19 printf '%s\n%s\n' "${PWD}" "$*"
23 email
="vapier@chromium.org"
28 while [[ $# -gt 0 ]] ; do
31 MANIFEST
='ssh://gerrit-int.chromium.org:29419/chromeos/manifest-internal.git'
32 REPO_URL
='https://git.chromium.org/git/external/repo.git'
35 MANIFEST
='https://git.chromium.org/git/chromiumos/manifest.git'
36 REPO_URL
='https://git.chromium.org/git/external/repo.git'
44 REF
=$
(realpath
"${2:-$(echo ~/chromiumos)}")
54 if [[ ${#BRANCH} -eq 3 ]] && [[ -d ${REF} ]] ; then
55 BRANCH
=$
(git
--git-dir="${REF}/.repo/manifests.git" branch
-a |
grep -o "release-${BRANCH}.*")
59 ${MANIFEST:+-u "${MANIFEST}"} \
60 ${REPO_URL:+--repo-url="${REPO_URL}"} \
61 ${REF:+--reference "${REF}"} \
62 ${BRANCH:+-b "${BRANCH}"}
64 rdir
=$
(realpath
"`pwd`")
65 while [[ ! -d ${rdir}/.repo
]] ; do
67 [[ ${rdir:-/} == "/" ]] && break
70 if [[ -d ${rdir} ]] ; then
71 gcfg
() { git
--git-dir="$1" config user.email
"${@:2}" ; }
72 if [[ $
(gcfg
"${rdir}/manifests.git") != "${email}" ]] ; then
73 echo "${rdir}: setting e-mail to ${email}"
74 find "${rdir}" -type d
-name '*.git' | \