Chromium Code Reviews| Index: update_depot_tools |
| diff --git a/update_depot_tools b/update_depot_tools |
| index dc58e5211fc8711adcae0976873a25a09f700408..4cf8586c19849d0b5b50b643a5dfd6f777ff1266 100755 |
| --- a/update_depot_tools |
| +++ b/update_depot_tools |
| @@ -34,7 +34,8 @@ fi |
| # Test git and git --version. |
| function test_git { |
| - local GITV="$("$GIT" --version)" || { |
| + local GITV |
| + GITV="$("$GIT" --version)" || { |
| echo "git isn't installed, please install it" |
| exit 1 |
| } |
| @@ -49,7 +50,8 @@ function test_git { |
| # Test git svn and git svn --version. |
| function test_git_svn { |
| - local GITV="$("$GIT" svn --version)" || { |
| + local GITV |
| + GITV="$("$GIT" svn --version)" || { |
| echo "git-svn isn't installed, please install it" |
| exit 1 |
| } |
| @@ -70,9 +72,10 @@ function is_git_clone_repo { |
| function update_git_repo { |
| if is_git_clone_repo; then |
| git fetch -q origin &> /dev/null |
| - local REBASE_TXT=$(git rebase -q origin/master 2>&1) |
| - local STATUS=$? |
| - if [[ $STATUS != 0 ]]; then |
| + local REBASE_TXT, STATUS |
|
szager1
2012/11/20 21:40:19
No comma
newt (away)
2012/11/20 21:56:44
Done.
|
| + REBASE_TXT=$(git rebase -q origin/master 2>&1) |
| + STATUS=$? |
| + if [[ $STATUS -ne 0 ]]; then |
| echo "depot_tools update failed. Conflict in $base_dir" >&2 |
| echo "$REBASE_TXT" >&2 |
| git rebase --abort 2> /dev/null |