| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 | 2 |
| 3 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 BUILD_DIR=$(dirname "$0") | 7 BUILD_DIR=$(dirname "$0") |
| 8 | 8 |
| 9 function depot_tools_error() { | 9 function depot_tools_error() { |
| 10 echo "Cannot find depot_tools python - is it installed and in your path?" 1>&2 | 10 echo "Cannot find depot_tools python - is it installed and in your path?" 1>&2 |
| 11 exit 1 | 11 exit 1 |
| 12 } | 12 } |
| 13 | 13 |
| 14 if [ "$(uname | cut -b1-6)" == "CYGWIN" ] ; then | 14 if [ "$(uname | cut -b1-6)" == "CYGWIN" ] ; then |
| 15 # On cygwin, we use the verison of python from depot_tools. | 15 # On cygwin, we use the verison of python from depot_tools. |
| 16 echo "Detected cygwin - looking for python in depot_tools" | 16 echo "Detected cygwin - looking for python in depot_tools" |
| 17 GCLIENT_PATH=$(which gclient) | 17 GCLIENT_PATH=$(which gclient) |
| 18 if ! [ -f "$GCLIENT_PATH" ] ; then | 18 if ! [ -f "$GCLIENT_PATH" ] ; then |
| 19 depot_tools_error | 19 depot_tools_error |
| 20 fi | 20 fi |
| 21 DEPOT_TOOLS=$(dirname "$GCLIENT_PATH") | 21 DEPOT_TOOLS=$(dirname "$GCLIENT_PATH") |
| 22 PYTHON_PATH="$DEPOT_TOOLS/python" | 22 PYTHON_PATH="$DEPOT_TOOLS/python" |
| 23 if ! [ -f "$PYTHON_PATH" ] ; then | 23 if ! [ -f "$PYTHON_PATH" ] ; then |
| 24 depot_tools_error | 24 depot_tools_error |
| 25 fi | 25 fi |
| 26 | 26 |
| 27 # The output from build.py doesn't seem seem to print to the console until | 27 # The output from build.py doesn't seem seem to print to the console until |
| 28 # it's finished, so print a message so people don't think it's hung. | 28 # it's finished, so print a message so people don't think it's hung. |
| 29 echo "Running - this can take about a minute" | 29 echo "Running - this can take about a minute" |
| 30 echo "(it goes faster if you have a Release build of test_shell)" | 30 echo "(it goes faster if you have a Release build of DumpRenderTree)" |
| 31 | 31 |
| 32 $PYTHON_PATH $BUILD_DIR/build.py $* | 32 $PYTHON_PATH $BUILD_DIR/build.py $* |
| 33 else | 33 else |
| 34 # On all other platforms, we just run the script directly. | 34 # On all other platforms, we just run the script directly. |
| 35 $BUILD_DIR/build.py $* | 35 $BUILD_DIR/build.py $* |
| 36 fi | 36 fi |
| OLD | NEW |