]>
git.wh0rd.org - home.git/blob - .bin/cros-repo
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
='http://git.chromium.org/external/repo.git'
35 MANIFEST
='http://git.chromium.org/chromiumos/manifest.git'
36 REPO_URL
='http://git.chromium.org/external/repo.git'
53 rdir
=$
(realpath
"`pwd`")
54 while [[ ! -d ${rdir}/.repo
]] ; do
56 [[ ${rdir:-/} == "/" ]] && break
59 if [[ -d ${rdir} ]] ; then
60 gcfg
() { git
--git-dir="$1" config user.email
"${@:2}" ; }
61 if [[ $
(gcfg
"${rdir}/manifests.git") != "${email}" ]] ; then
62 echo "${rdir}: setting e-mail to ${email}"
63 find "${rdir}" -type d
-name '*.git' | \
72 ${MANIFEST:+-u "${MANIFEST}"} \
73 ${REPO_URL:+--repo-url="${REPO_URL}"} \
74 ${REF:+--reference "${REF}"} \
75 ${BRANCH:+-b "${BRANCH}"}