OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2009 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 26 matching lines...) Expand all Loading... |
37 exit 1 | 37 exit 1 |
38 fi | 38 fi |
39 } | 39 } |
40 | 40 |
41 | 41 |
42 # Update git checkouts prior the cygwin check, we don't want to use msysgit. | 42 # Update git checkouts prior the cygwin check, we don't want to use msysgit. |
43 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.git" ] | 43 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.git" ] |
44 then | 44 then |
45 cd $base_dir | 45 cd $base_dir |
46 test_git_svn | 46 test_git_svn |
47 git svn rebase -q -q | 47 # work around a git-svn --quiet bug |
| 48 OUTPUT=`git svn rebase -q -q` |
| 49 if [[ ! "$OUTPUT" =~ Current.branch ]]; then |
| 50 echo $OUTPUT |
| 51 fi |
48 cd - > /dev/null | 52 cd - > /dev/null |
49 fi | 53 fi |
50 | 54 |
51 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/git-cl-repo/.git" ] | 55 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/git-cl-repo/.git" ] |
52 then | 56 then |
53 test_git | 57 test_git |
54 (cd "$base_dir/git-cl-repo"; git pull -q) | 58 (cd "$base_dir/git-cl-repo"; git pull -q) |
55 fi | 59 fi |
56 | 60 |
57 # Use the batch file as an entry point if on cygwin. | 61 # Use the batch file as an entry point if on cygwin. |
58 if [ "${OSTYPE}" = "cygwin" -a "${TERM}" != "xterm" ]; then | 62 if [ "${OSTYPE}" = "cygwin" -a "${TERM}" != "xterm" ]; then |
59 ${base_dir}/gclient.bat "$@" | 63 ${base_dir}/gclient.bat "$@" |
60 exit | 64 exit |
61 fi | 65 fi |
62 | 66 |
63 | 67 |
64 # We're on POSIX (not cygwin). We can now safely look for svn checkout. | 68 # We're on POSIX (not cygwin). We can now safely look for svn checkout. |
65 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ] | 69 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ] |
66 then | 70 then |
67 # Update the bootstrap directory to stay up-to-date with the latest | 71 # Update the bootstrap directory to stay up-to-date with the latest |
68 # depot_tools. | 72 # depot_tools. |
69 svn -q up "$base_dir" | 73 svn -q up "$base_dir" |
70 fi | 74 fi |
71 | 75 |
72 exec python "$base_dir/gclient.py" "$@" | 76 exec python "$base_dir/gclient.py" "$@" |
OLD | NEW |