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'
54 ${MANIFEST:+-u "${MANIFEST}"} \
55 ${REPO_URL:+--repo-url="${REPO_URL}"} \
56 ${REF:+--reference "${REF}"} \
57 ${BRANCH:+-b "${BRANCH}"}
59 rdir=$(realpath "`pwd`")
60 while [[ ! -d ${rdir}/.repo ]] ; do
62 [[ ${rdir:-/} == "/" ]] && break
65 if [[ -d ${rdir} ]] ; then
66 gcfg() { git --git-dir="$1" config user.email "${@:2}" ; }
67 if [[ $(gcfg "${rdir}/manifests.git") != "${email}" ]] ; then
68 echo "${rdir}: setting e-mail to ${email}"
69 find "${rdir}" -type d -name '*.git' | \