Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Side by Side Diff: python_git_runner.sh

Issue 184113002: Add git-map and git-short-map to depot_tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@new_branch
Patch Set: rebase and add better way to run python git extensions Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« git_short_map.py ('K') | « git_short_map.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash
agable 2014/02/28 19:54:58 Make 'git cl' and 'git cache' use this.
2 # Copyright (c) 2014 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 file is designed to be sourced from a bash script whose name takes the
7 ## form 'git-sub-command'. This script will then instead invoke 'git_sub_command .py'
agable 2014/02/28 19:54:58 80 chars? (It's wrapping on Rietveld but I'm too l
iannucci 2014/03/06 00:18:39 Oh, weird. I think this is my bad. Done.
8 ## correctly under mingw as well as posix-ey systems, passing along all other
9 ## command line flags.
10
11 ## Example:
12 ## echo ". python_git_runner.sh" > git-foo-command
13 ## ./git-foo-command #=> runs `python git_foo_command.py`
14
15 OUTPUT="$(uname | grep 'MINGW')"
16 MINGW=$?
17
18 BASE="$(basename "$0")"
19 SCRIPT="${BASE//-/_}.py"
20
21 if [ $MINGW = 0 ]; then
22 base_dir="${0%\\*}"
23 else
24 base_dir=$(dirname "$0")
25 fi
26
27 if [ -e "$base_dir/python.bat" -a $MINGW = 0 ]; then
28 PYTHONDONTWRITEBYTECODE=1 cmd.exe //c "$base_dir\\python.bat" "$base_dir\\$SCR IPT" "$@"
29 else
30 PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/$SCRIPT" "$@"
31 fi
OLDNEW
« git_short_map.py ('K') | « git_short_map.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698