OLD | NEW |
1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 # This script will try to sync the bootstrap directories and then defer control. | 6 # This script will try to sync the bootstrap directories and then defer control. |
7 | 7 |
8 base_dir=$(dirname "$0") | 8 base_dir=$(dirname "$0") |
9 | 9 |
10 # Test git and git --version. | 10 # Test git and git --version. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 # Update git checkouts prior the cygwin check, we don't want to use msysgit. | 46 # Update git checkouts prior the cygwin check, we don't want to use msysgit. |
47 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.git" ] | 47 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.git" ] |
48 then | 48 then |
49 cd $base_dir | 49 cd $base_dir |
50 test_git_svn | 50 test_git_svn |
51 # work around a git-svn --quiet bug | 51 # work around a git-svn --quiet bug |
52 OUTPUT=`git svn rebase -q -q` | 52 OUTPUT=`git svn rebase -q -q` |
53 if [[ ! "$OUTPUT" == *Current.branch* ]]; then | 53 if [[ ! "$OUTPUT" == *Current.branch* ]]; then |
54 echo $OUTPUT | 54 echo $OUTPUT 1>&2 |
55 fi | 55 fi |
56 cd - > /dev/null | 56 cd - > /dev/null |
57 fi | 57 fi |
58 | 58 |
59 # We're on POSIX. We can now safely look for svn checkout. | 59 # We're on POSIX. We can now safely look for svn checkout. |
60 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ] | 60 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ] |
61 then | 61 then |
62 # Update the bootstrap directory to stay up-to-date with the latest | 62 # Update the bootstrap directory to stay up-to-date with the latest |
63 # depot_tools. | 63 # depot_tools. |
64 BEFORE_REVISION=$(get_svn_revision) | 64 BEFORE_REVISION=$(get_svn_revision) |
65 svn -q up "$base_dir" | 65 svn -q up "$base_dir" |
66 AFTER_REVISION=$(get_svn_revision) | 66 AFTER_REVISION=$(get_svn_revision) |
67 if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then | 67 if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then |
68 echo "Depot Tools has been updated to revision $AFTER_REVISION." | 68 echo "Depot Tools has been updated to revision $AFTER_REVISION." 1>&2 |
69 fi | 69 fi |
70 fi | 70 fi |
OLD | NEW |