maruel@chromium.org | 565db0e | 2009-06-05 18:08:54 +0000 | [diff] [blame] | 1 | #!/bin/sh |
maruel@chromium.org | 31919ae | 2012-02-14 03:07:35 +0000 | [diff] [blame] | 2 | # Copyright (c) 2012 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 | |
cmp@chromium.org | 4c6e404 | 2011-06-01 18:52:31 +0000 | [diff] [blame] | 9 | # Test if this script is running under a MSys install. If it is, we will |
| 10 | # hardcode the path to Python where possible. |
| 11 | OUTPUT="$(uname | grep 'MINGW')" |
| 12 | MINGW=$? |
| 13 | |
szager@google.com | ed9a0ec | 2012-11-06 22:25:16 +0000 | [diff] [blame] | 14 | if [ $MINGW = 0 ]; then |
| 15 | base_dir="${0%\\*}" |
| 16 | else |
| 17 | base_dir=$(dirname "$0") |
| 18 | fi |
| 19 | |
| 20 | # Uncomment this line if you never use gclient. |
| 21 | # "$base_dir"/update_depot_tools |
| 22 | |
maruel@chromium.org | 4f4e76f | 2013-10-31 19:10:56 +0000 | [diff] [blame] | 23 | if [ -e "$base_dir/python.bat" -a $MINGW = 0 ]; then |
maruel@chromium.org | 22879a7 | 2013-11-01 22:58:54 +0000 | [diff] [blame] | 24 | PYTHONDONTWRITEBYTECODE=1 cmd.exe //c "$base_dir\\python.bat" "$base_dir\\git_cl.py" "$@" |
cmp@chromium.org | 4c6e404 | 2011-06-01 18:52:31 +0000 | [diff] [blame] | 25 | else |
maruel@chromium.org | 3abe79b | 2011-09-28 00:55:18 +0000 | [diff] [blame] | 26 | PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/git_cl.py" "$@" |
cmp@chromium.org | 4c6e404 | 2011-06-01 18:52:31 +0000 | [diff] [blame] | 27 | fi |