Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: crup-runner.sh

Issue 11260036: Keep the parallel execution pipes full as much as possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | git-crup » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crup-runner.sh
===================================================================
--- crup-runner.sh (revision 0)
+++ crup-runner.sh (revision 0)
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+if [ -z "$*" ]; then
+ exit 0
+fi
+set -o pipefail
+dir="$1"
+solution="${1%%/*}"
+cd "$solution"
+if [ "$solution" = "$1" ]; then
+ shift
+ $@ | sed "s/^/[$solution] /g" 1>&2
+ if [ $? -ne 0 ]; then
+ exit $?
+ fi
+ "$GIT_EXE" submodule --quiet sync
+ "$GIT_EXE" ls-files -s | grep ^160000 | awk '{print $4}' |
+ sed "s/^/$solution\//g"
+ status=$?
+else
+ submodule="${1#*/}"
+ echo "[$solution] updating $submodule ..."
+ "$GIT_EXE" submodule update --quiet --init "$submodule" |
+ ( grep -v '^Skipping submodule' || true ) | sed "s|^|[$1] |g"
+ status=$?
+ if [ "$status" -ne "0" ]; then
+ echo "[$solution] FAILED to update $submodule"
+ fi
+fi
+exit $status
Property changes on: crup-runner.sh
___________________________________________________________________
Added: svn:eol-style
+ LF
Added: svn:executable
+ *
« no previous file with comments | « no previous file | git-crup » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698