| OLD | NEW |
| 1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 if [ "$USER" == "root" ]; | 8 if [ "$USER" == "root" ]; |
| 9 then | 9 then |
| 10 echo Running depot tools as root is sad. | 10 echo Running depot tools as root is sad. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 else | 35 else |
| 36 base_dir=$(dirname "$0") | 36 base_dir=$(dirname "$0") |
| 37 if [ -L "$base_dir" ]; then | 37 if [ -L "$base_dir" ]; then |
| 38 base_dir=`cd "$base_dir" && pwd -P` | 38 base_dir=`cd "$base_dir" && pwd -P` |
| 39 fi | 39 fi |
| 40 fi | 40 fi |
| 41 | 41 |
| 42 # We want to update the bundled tools even under MinGW. | 42 # We want to update the bundled tools even under MinGW. |
| 43 if [ $MINGW = 0 ]; then | 43 if [ $MINGW = 0 ]; then |
| 44 $COMSPEC /c `cygpath -w "$base_dir/bootstrap/win/win_tools.bat"` | 44 $COMSPEC /c `cygpath -w "$base_dir/bootstrap/win/win_tools.bat"` |
| 45 case $? in |
| 46 123) |
| 47 # msys environment was upgraded, need to quit. |
| 48 exit 123 |
| 49 ;; |
| 50 0) |
| 51 ;; |
| 52 *) |
| 53 exit $? |
| 54 esac |
| 45 fi | 55 fi |
| 46 | 56 |
| 47 CANONICAL_GIT_URL="https://chromium.googlesource.com/chromium/tools/depot_tools.
git" | 57 CANONICAL_GIT_URL="https://chromium.googlesource.com/chromium/tools/depot_tools.
git" |
| 48 | 58 |
| 49 SVN="svn" | 59 SVN="svn" |
| 50 if [ -d "$base_dir/svn_bin" -a $MINGW = 0 ]; then | 60 if [ -d "$base_dir/svn_bin" -a $MINGW = 0 ]; then |
| 51 SVN="$base_dir/svn_bin/svn.exe" | 61 SVN="$base_dir/svn_bin/svn.exe" |
| 52 fi | 62 fi |
| 53 | 63 |
| 54 GIT="git" | 64 GIT="git" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 "$SVN" -q up "$base_dir" | 168 "$SVN" -q up "$base_dir" |
| 159 AFTER_REVISION=$(get_svn_revision) | 169 AFTER_REVISION=$(get_svn_revision) |
| 160 if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then | 170 if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then |
| 161 if [ -z "$DEPOT_TOOLS_HIDE_UPDATED_MESSAGE" ]; then | 171 if [ -z "$DEPOT_TOOLS_HIDE_UPDATED_MESSAGE" ]; then |
| 162 echo "Depot Tools has been updated to revision $AFTER_REVISION." 1>&2 | 172 echo "Depot Tools has been updated to revision $AFTER_REVISION." 1>&2 |
| 163 fi | 173 fi |
| 164 fi | 174 fi |
| 165 fi | 175 fi |
| 166 | 176 |
| 167 find "$base_dir" -iname "*.pyc" -exec rm -f {} \; | 177 find "$base_dir" -iname "*.pyc" -exec rm -f {} \; |
| OLD | NEW |