maruel@chromium.org | 565db0e | 2009-06-05 18:08:54 +0000 | [diff] [blame] | 1 | #!/bin/sh |
cmp@chromium.org | 4c6e404 | 2011-06-01 18:52:31 +0000 | [diff] [blame] | 2 | # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
maruel@chromium.org | 565db0e | 2009-06-05 18:08:54 +0000 | [diff] [blame] | 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
maruel@chromium.org | 2a74d37 | 2011-03-29 19:05:50 +0000 | [diff] [blame] | 6 | # git-cl -- a git-command for integrating reviews on Rietveld |
| 7 | # Copyright (C) 2008 Evan Martin <martine@danga.com> |
| 8 | |
maruel@chromium.org | 565db0e | 2009-06-05 18:08:54 +0000 | [diff] [blame] | 9 | base_dir=$(dirname "$0") |
msb@chromium.org | dffe494 | 2009-11-18 02:25:16 +0000 | [diff] [blame] | 10 | |
msb@chromium.org | 2a94904 | 2010-10-18 18:04:01 +0000 | [diff] [blame] | 11 | "$base_dir"/update_depot_tools |
cmp@chromium.org | 4c6e404 | 2011-06-01 18:52:31 +0000 | [diff] [blame] | 12 | |
| 13 | # Test if this script is running under a MSys install. If it is, we will |
| 14 | # hardcode the path to Python where possible. |
| 15 | OUTPUT="$(uname | grep 'MINGW')" |
| 16 | MINGW=$? |
| 17 | |
| 18 | if [ -d "$base_dir/python_bin" -a $MINGW = 0 ]; then |
maruel@chromium.org | 3abe79b | 2011-09-28 00:55:18 +0000 | [diff] [blame] | 19 | PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/python_bin/python.exe" "$base_dir"/git_cl.py "$@" |
cmp@chromium.org | 4c6e404 | 2011-06-01 18:52:31 +0000 | [diff] [blame] | 20 | else |
maruel@chromium.org | 3abe79b | 2011-09-28 00:55:18 +0000 | [diff] [blame] | 21 | PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/git_cl.py" "$@" |
cmp@chromium.org | 4c6e404 | 2011-06-01 18:52:31 +0000 | [diff] [blame] | 22 | fi |