blob: 03efa1aa25926896a8c950f9349c1ded43dd8aab [file] [log] [blame]
maruel@chromium.org565db0e2009-06-05 18:08:54 +00001#!/bin/sh
maruel@chromium.org31919ae2012-02-14 03:07:35 +00002# Copyright (c) 2012 The Chromium Authors. All rights reserved.
maruel@chromium.org565db0e2009-06-05 18:08:54 +00003# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
maruel@chromium.org2a74d372011-03-29 19:05:50 +00006# git-cl -- a git-command for integrating reviews on Rietveld
7# Copyright (C) 2008 Evan Martin <martine@danga.com>
8
maruel@chromium.org565db0e2009-06-05 18:08:54 +00009base_dir=$(dirname "$0")
msb@chromium.orgdffe4942009-11-18 02:25:16 +000010
maruel@chromium.org31919ae2012-02-14 03:07:35 +000011# Uncomment this line if you never use gclient.
12# "$base_dir"/update_depot_tools
cmp@chromium.org4c6e4042011-06-01 18:52:31 +000013
14# Test if this script is running under a MSys install. If it is, we will
15# hardcode the path to Python where possible.
16OUTPUT="$(uname | grep 'MINGW')"
17MINGW=$?
18
19if [ -d "$base_dir/python_bin" -a $MINGW = 0 ]; then
maruel@chromium.org3abe79b2011-09-28 00:55:18 +000020 PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/python_bin/python.exe" "$base_dir"/git_cl.py "$@"
cmp@chromium.org4c6e4042011-06-01 18:52:31 +000021else
maruel@chromium.org3abe79b2011-09-28 00:55:18 +000022 PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/git_cl.py" "$@"
cmp@chromium.org4c6e4042011-06-01 18:52:31 +000023fi