blob: 95561fb58a2fe371e3f186fbb10b094abf6c6787 [file] [log] [blame]
maruel@google.comfb2b8eb2009-04-23 21:03:42 +00001#!/bin/sh
2# Copyright (c) 2009 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6# This script will try to sync the bootstrap directories and then defer control.
7
8base_dir=$(dirname "$0")
maruel@chromium.orgcf1e53b2009-05-07 02:56:13 +00009
10# Use the batch file as an entry point if on cygwin.
11if [ "${OSTYPE}" = "cygwin" ]; then
maruel@chromium.orgbeffe122009-06-09 20:28:23 +000012 ${base_dir}/gclient.bat "$@"
maruel@chromium.orgcf1e53b2009-05-07 02:56:13 +000013 exit
14fi
15
maruel@google.comfb2b8eb2009-04-23 21:03:42 +000016
17if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ]
18then
19 # Update the bootstrap directory to stay up-to-date with the latest
20 # depot_tools.
21 svn -q up "$base_dir/bootstrap"
22
23 # Then defer the control to the bootstrapper.
maruel@google.com820410c2009-04-24 01:32:26 +000024 exec "$base_dir/bootstrap/gclient.sh" "$@"
maruel@google.comfb2b8eb2009-04-23 21:03:42 +000025else
maruel@google.com820410c2009-04-24 01:32:26 +000026 exec python "$base_dir/gclient.py" "$@"
maruel@google.comfb2b8eb2009-04-23 21:03:42 +000027fi