Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 if ((GITD[0] < 1 || (GITD[0] == 1 && GITD[1] < 6) )); then | 35 if ((GITD[0] < 1 || (GITD[0] == 1 && GITD[1] < 6) )); then |
| 36 echo "git version is ${GITV}, please update to a version later than 1.6" | 36 echo "git version is ${GITV}, please update to a version later than 1.6" |
| 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 test_git_svn | 45 # Skip this call since it fails outside a git checkout. |
| 46 #test_git_svn | |
|
Nasser Grainawi
2010/01/08 18:10:30
what if we cd to $base_dir first? Since we just ve
| |
| 46 (cd "$base_dir"; git svn rebase -q -q) | 47 (cd "$base_dir"; git svn rebase -q -q) |
| 47 fi | 48 fi |
| 48 | 49 |
| 49 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/git-cl-repo/.git" ] | 50 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/git-cl-repo/.git" ] |
| 50 then | 51 then |
| 51 test_git | 52 test_git |
| 52 (cd "$base_dir/git-cl-repo"; git pull -q) | 53 (cd "$base_dir/git-cl-repo"; git pull -q) |
| 53 fi | 54 fi |
| 54 | 55 |
| 55 # Use the batch file as an entry point if on cygwin. | 56 # Use the batch file as an entry point if on cygwin. |
| 56 if [ "${OSTYPE}" = "cygwin" -a "${TERM}" != "xterm" ]; then | 57 if [ "${OSTYPE}" = "cygwin" -a "${TERM}" != "xterm" ]; then |
| 57 ${base_dir}/gclient.bat "$@" | 58 ${base_dir}/gclient.bat "$@" |
| 58 exit | 59 exit |
| 59 fi | 60 fi |
| 60 | 61 |
| 61 | 62 |
| 62 # We're on POSIX (not cygwin). We can now safely look for svn checkout. | 63 # We're on POSIX (not cygwin). We can now safely look for svn checkout. |
| 63 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ] | 64 if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ] |
| 64 then | 65 then |
| 65 # Update the bootstrap directory to stay up-to-date with the latest | 66 # Update the bootstrap directory to stay up-to-date with the latest |
| 66 # depot_tools. | 67 # depot_tools. |
| 67 svn -q up "$base_dir" | 68 svn -q up "$base_dir" |
| 68 fi | 69 fi |
| 69 | 70 |
| 70 exec python "$base_dir/gclient.py" "$@" | 71 exec python "$base_dir/gclient.py" "$@" |
| OLD | NEW |