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

Side by Side Diff: crup-runner.sh

Issue 12717016: Add --recursive arg to git-submodule update. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 update_toplevel () { 3 update_toplevel () {
4 # Don't "pull" if checkout is not on a named branch 4 # Don't "pull" if checkout is not on a named branch
5 if test "$2" = "pull" && ( ! git symbolic-ref HEAD >/dev/null 2>/dev/null ); t hen 5 if test "$2" = "pull" && ( ! git symbolic-ref HEAD >/dev/null 2>/dev/null ); t hen
6 first_args="$1 fetch" 6 first_args="$1 fetch"
7 else 7 else
8 first_args="$1 $2" 8 first_args="$1 $2"
9 fi 9 fi
10 shift 2 10 shift 2
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 set_target_os 105 set_target_os
106 106
107 "$GIT_EXE" ls-files -s | grep ^160000 | awk '{print $4}' | 107 "$GIT_EXE" ls-files -s | grep ^160000 | awk '{print $4}' |
108 while read submod; do 108 while read submod; do
109 process_submodule "$submod" 109 process_submodule "$submod"
110 done 110 done
111 status=$? 111 status=$?
112 else 112 else
113 submodule="${1#*/}" 113 submodule="${1#*/}"
114 echo "[$solution] updating $submodule" 114 echo "[$solution] updating $submodule"
115 "$GIT_EXE" submodule update --quiet "$submodule" | 115 "$GIT_EXE" submodule update --recursive --quiet "$submodule" |
116 ( grep -v '^Skipping submodule' || true ) | sed "s|^|[$1] |g" 116 ( grep -v '^Skipping submodule' || true ) | sed "s|^|[$1] |g"
117 status=$? 117 status=$?
118 if [ "$status" -ne "0" ]; then 118 if [ "$status" -ne "0" ]; then
119 echo "[$solution] FAILED to update $submodule" 119 echo "[$solution] FAILED to update $submodule"
120 fi 120 fi
121 fi 121 fi
122 exit $status 122 exit $status
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698