]> git.wh0rd.org Git - home.git/commitdiff
add group/manifest flags
authorMike Frysinger <vapier@gentoo.org>
Tue, 5 Feb 2013 23:36:32 +0000 (18:36 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 5 Feb 2013 23:36:32 +0000 (18:36 -0500)
.bin/cros-repo

index 6a73ea8e5b9685f4223a335c4dd86ca52cdc1430..56ab382d5cac987115aa17dc816e06d810475cc1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 usage() {
        cat <<-EOF
@@ -10,6 +10,8 @@ usage() {
           ext            switch to external tree
           -b <branch>    switch branches (use "master" to get to ToT)
           -r <path>      patch to reference repo (e.g. ~/chromiumos/)
+          -g <group>
+          -m <manifest>
 
        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