OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # A convenience script to largely replicate the behavior of `gclient sync` in a | 6 # A convenience script to largely replicate the behavior of `gclient sync` in a |
7 # submodule-based checkout. Fetches latest commits for top-level solutions; | 7 # submodule-based checkout. Fetches latest commits for top-level solutions; |
8 # updates submodules; and runs post-sync hooks. | 8 # updates submodules; and runs post-sync hooks. |
9 | 9 |
10 # Auto-update depot_tools | 10 # Auto-update depot_tools |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 xargs $max_lines -P "$j" "$crup_runner" ) | 132 xargs $max_lines -P "$j" "$crup_runner" ) |
133 else | 133 else |
134 ls -d */.git | | 134 ls -d */.git | |
135 while read gitdir; do | 135 while read gitdir; do |
136 serial_update "${gitdir%%/.git}" | 136 serial_update "${gitdir%%/.git}" |
137 done | 137 done |
138 fi | 138 fi |
139 | 139 |
140 status=$? | 140 status=$? |
141 | 141 |
142 if [ "$hooks" = "yes" -a "$status" -eq 0 ]; then | 142 if [ "$status" -ne 0 ]; then |
| 143 cat 1>&2 <<EOF |
| 144 Please check the preceding terminal output for error messages. |
| 145 Run 'git submodule status' to see the current state of submodule checkouts. |
| 146 EOF |
| 147 exit $status |
| 148 fi |
| 149 |
| 150 if [ "$hooks" = "yes" ]; then |
143 "$runhooks" | 151 "$runhooks" |
144 status=$? | 152 status=$? |
145 fi | 153 fi |
146 | 154 |
147 echo | 155 echo |
148 exit $status | 156 exit $status |
OLD | NEW |