389c8e9d2d
if a filename ends with `.py` and the file begins with '#!.*python.*', make it executable. Change-Id: I41de516ff37343d3b0979bde9fd61813aec7365c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254439 Commit-Queue: Hal Canary <halcanary@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Auto-Submit: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
19 lines
367 B
Python
Executable File
19 lines
367 B
Python
Executable File
#!/usr/bin/env python
|
|
#
|
|
# Copyright 2019 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
GIT = 'git.bat' if sys.platform == 'win32' else 'git'
|
|
|
|
|
|
def git(*args):
|
|
'''Run the given Git command, return the output.'''
|
|
return subprocess.check_output([GIT]+list(args))
|