blob: 0fc4354d57830f99f6b9e01cf7381d625ec26436 [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
cmp@chromium.org4c6e4042011-06-01 18:52:31 +00009# Test if this script is running under a MSys install. If it is, we will
10# hardcode the path to Python where possible.
11OUTPUT="$(uname | grep 'MINGW')"
12MINGW=$?
13
szager@google.comed9a0ec2012-11-06 22:25:16 +000014if [ $MINGW = 0 ]; then
15 base_dir="${0%\\*}"
16else
17 base_dir=$(dirname "$0")
18fi
19
20# Uncomment this line if you never use gclient.
21# "$base_dir"/update_depot_tools
22
maruel@chromium.org7b6847f2013-10-31 14:25:18 +000023if [ -d "$base_dir/python_bin" -a $MINGW = 0 ]; then
24 PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/python_bin/python.exe" "$base_dir"/git_cl.py "$@"
cmp@chromium.org4c6e4042011-06-01 18:52:31 +000025else
maruel@chromium.org3abe79b2011-09-28 00:55:18 +000026 PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/git_cl.py" "$@"
cmp@chromium.org4c6e4042011-06-01 18:52:31 +000027fi