• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2
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
5# found in the LICENSE file.
6
7BUILD_DIR=$(dirname "$0")
8
9function depot_tools_error() {
10  echo "Cannot find depot_tools python - is it installed and in your path?" 1>&2
11  exit 1
12}
13
14if [ "$(uname | cut -b1-6)" == "CYGWIN" ] ; then
15  # On cygwin, we use the verison of python from depot_tools.
16  echo "Detected cygwin - looking for python in depot_tools"
17  GCLIENT_PATH=$(which gclient)
18  if ! [ -f "$GCLIENT_PATH" ] ; then
19    depot_tools_error
20  fi
21  DEPOT_TOOLS=$(dirname "$GCLIENT_PATH")
22  PYTHON_PATH="$DEPOT_TOOLS/python"
23  if ! [ -f "$PYTHON_PATH" ] ; then
24    depot_tools_error
25  fi
26
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.
29  echo "Running - this can take about a minute"
30  echo "(it goes faster if you have a Release build of DumpRenderTree)"
31
32  $PYTHON_PATH $BUILD_DIR/build.py $*
33else
34  # On all other platforms, we just run the script directly.
35  $BUILD_DIR/build.py $*
36fi
37