From: Mike Frysinger Date: Tue, 5 Feb 2013 23:36:32 +0000 (-0500) Subject: add group/manifest flags X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=34846459d1e9e85d39645940d3429410ddc57048;p=home.git add group/manifest flags --- diff --git a/.bin/cros-repo b/.bin/cros-repo index 6a73ea8..56ab382 100755 --- a/.bin/cros-repo +++ b/.bin/cros-repo @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash usage() { cat <<-EOF @@ -10,6 +10,8 @@ usage() { ext switch to external tree -b switch branches (use "master" to get to ToT) -r patch to reference repo (e.g. ~/chromiumos/) + -g + -m Operates on the repo in ${PWD} EOF @@ -25,10 +27,12 @@ email="vapier@chromium.org" REF= BRANCH= MANIFEST= +MANIFEST_NAME= +GROUPS=() REPO_URL= while [[ $# -gt 0 ]] ; do case $1 in - depot_tools) + depot_tools|dt) exec git clone https://git.chromium.org/chromium/tools/depot_tools.git ;; int) @@ -48,6 +52,14 @@ while [[ $# -gt 0 ]] ; do REF=$(realpath "${2:-$(echo ~/chromiumos)}") shift ;; + -g) + GROUPS+=( "$2" ) + shift + ;; + -m) + MANIFEST_NAME="${2%.xml}.xml" + shift + ;; *) usage ;; @@ -63,7 +75,9 @@ v repo init \ ${MANIFEST:+-u "${MANIFEST}"} \ ${REPO_URL:+--repo-url="${REPO_URL}"} \ ${REF:+--reference "${REF}"} \ + ${MANIFEST_NAME:+-m "${MANIFEST_NAME}"} \ ${BRANCH:+-b "${BRANCH}"} +# ${GROUPS:+-g "${GROUPS[*]}"} rdir=$(realpath "`pwd`") while [[ ! -d ${rdir}/.repo ]] ; do