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 11 matching lines...) Expand all Loading... |
22 base_dir=$(dirname "$0") | 22 base_dir=$(dirname "$0") |
23 if [ -L "$base_dir" ]; then | 23 if [ -L "$base_dir" ]; then |
24 base_dir=`cd "$base_dir" && pwd -P` | 24 base_dir=`cd "$base_dir" && pwd -P` |
25 fi | 25 fi |
26 fi | 26 fi |
27 | 27 |
28 # Don't try to use Cygwin tools. Get real win32 tools using the batch script. | 28 # Don't try to use Cygwin tools. Get real win32 tools using the batch script. |
29 OUTPUT="$(uname | grep 'CYGWIN')" | 29 OUTPUT="$(uname | grep 'CYGWIN')" |
30 CYGWIN=$? | 30 CYGWIN=$? |
31 if [ $CYGWIN = 0 ]; then | 31 if [ $CYGWIN = 0 ]; then |
32 cmd /c `cygpath -w "$base_dir/bootstrap/win/win_tools.bat"` force | 32 cmd /c `cygpath -w "$base_dir/bootstrap/win/win_tools.bat"` |
33 fi | 33 fi |
34 | 34 |
35 CANONICAL_GIT_URL="https://chromium.googlesource.com/chromium/tools/depot_tools.
git" | 35 CANONICAL_GIT_URL="https://chromium.googlesource.com/chromium/tools/depot_tools.
git" |
36 | 36 |
37 SVN="svn" | 37 SVN="svn" |
38 if [ -d "$base_dir/svn_bin" -a $MINGW = 0 ]; then | 38 if [ -d "$base_dir/svn_bin" -a $MINGW = 0 ]; then |
39 SVN="$base_dir/svn_bin/svn.exe" | 39 SVN="$base_dir/svn_bin/svn.exe" |
40 fi | 40 fi |
41 | 41 |
42 GIT="git" | 42 GIT="git" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 # Update the root directory to stay up-to-date with the latest depot_tools. | 141 # Update the root directory to stay up-to-date with the latest depot_tools. |
142 BEFORE_REVISION=$(get_svn_revision) | 142 BEFORE_REVISION=$(get_svn_revision) |
143 "$SVN" -q up "$base_dir" | 143 "$SVN" -q up "$base_dir" |
144 AFTER_REVISION=$(get_svn_revision) | 144 AFTER_REVISION=$(get_svn_revision) |
145 if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then | 145 if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then |
146 echo "Depot Tools has been updated to revision $AFTER_REVISION." 1>&2 | 146 echo "Depot Tools has been updated to revision $AFTER_REVISION." 1>&2 |
147 fi | 147 fi |
148 fi | 148 fi |
149 | 149 |
150 find "$base_dir" -iname "*.pyc" -exec rm {} \; | 150 find "$base_dir" -iname "*.pyc" -exec rm {} \; |
OLD | NEW |