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

Side by Side Diff: python_runner.sh

Issue 1847783002: Multiple improvements to windows bash integration. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Add direct mode and unbuffered Created 4 years, 8 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
« no previous file with comments | « git_map_branches.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
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 ## This file is designed to be sourced from a bash script whose name takes the 5 ## This file is designed to be sourced from a bash script whose name takes the
6 ## form 'command-name'. This script will then instead invoke 6 ## form 'command-name'. This script will then instead invoke
7 ## '[depot_tools]/command_name.py' correctly under mingw as well 7 ## '[depot_tools]/command_name.py' correctly under mingw as well
8 ## as posix-ey systems, passing along all other command line flags. 8 ## as posix-ey systems, passing along all other command line flags.
9 9
10 ## Example: 10 ## Example:
(...skipping 23 matching lines...) Expand all
34 # within the depot_tools dir itself). In that case, treat it as if run like: 34 # within the depot_tools dir itself). In that case, treat it as if run like:
35 # "./command" 35 # "./command"
36 DEPOT_TOOLS="." 36 DEPOT_TOOLS="."
37 BASENAME="$0" 37 BASENAME="$0"
38 else 38 else
39 BASENAME="${0##*/}" 39 BASENAME="${0##*/}"
40 fi 40 fi
41 else 41 else
42 BASENAME="${0##*\\}" 42 BASENAME="${0##*\\}"
43 fi 43 fi
44
44 SCRIPT="${SCRIPT-${BASENAME//-/_}.py}" 45 SCRIPT="${SCRIPT-${BASENAME//-/_}.py}"
45 46
46 if [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then 47 if [[ $PYTHON_DIRECT = 1 ]]; then
47 cmd.exe //c "$DEPOT_TOOLS\\python.bat" "$DEPOT_TOOLS\\$SCRIPT" "$@" 48 python.exe "$DEPOT_TOOLS\\$SCRIPT" "$@"
48 else 49 else
49 exec "$DEPOT_TOOLS/$SCRIPT" "$@" 50 if [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then
51 cmd.exe //c "$DEPOT_TOOLS\\python.bat" "$DEPOT_TOOLS\\$SCRIPT" "$@"
52 else
53 exec "$DEPOT_TOOLS/$SCRIPT" "$@"
54 fi
50 fi 55 fi
OLDNEW
« no previous file with comments | « git_map_branches.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698