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. |
11 exit | 11 exit |
12 fi | 12 fi |
13 | 13 |
14 # Test if this script is running under a MSys install. If it is, we will | 14 # Test if this script is running under a MSys install. If it is, we will |
15 # hardcode the paths to SVN and Git where possible. | 15 # hardcode the paths to SVN and Git where possible. |
16 OUTPUT="$(uname | grep 'MINGW')" | 16 OUTPUT="$(uname | grep 'MINGW')" |
17 MINGW=$? | 17 MINGW=$? |
18 | 18 |
19 if [ $MINGW = 0 ]; then | 19 if [ $MINGW = 0 ]; then |
20 base_dir="${0%\\*}" | 20 base_dir="${0%/*}" |
21 else | 21 else |
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=$? |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 echo "Depot Tools has been updated to revision $AFTER_REVISION." 1>&2 | 150 echo "Depot Tools has been updated to revision $AFTER_REVISION." 1>&2 |
151 fi | 151 fi |
152 fi | 152 fi |
153 fi | 153 fi |
154 | 154 |
155 find "$base_dir" -iname "*.pyc" -exec rm {} \; | 155 find "$base_dir" -iname "*.pyc" -exec rm {} \; |
156 | 156 |
157 # Initialize/update virtualenv. | 157 # Initialize/update virtualenv. |
158 cd $base_dir | 158 cd $base_dir |
159 python -u ./bootstrap/bootstrap.py --deps_file bootstrap/deps.pyl --quiet ENV | 159 python -u ./bootstrap/bootstrap.py --deps_file bootstrap/deps.pyl --quiet ENV |
OLD | NEW |