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

Unified Diff: update_depot_tools

Issue 11308129: Fix usage of bash builtin "local" in update_depot_tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: remove comma Created 8 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_depot_tools
diff --git a/update_depot_tools b/update_depot_tools
index dc58e5211fc8711adcae0976873a25a09f700408..3ad917a8fdafa34dd7da1628d219185a64c2fe81 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
+ 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
« 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