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

Unified Diff: build/linux/rewrite_dirs.py

Issue 8667008: Fix python scripts in src/build/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: build/linux/rewrite_dirs.py
diff --git a/build/linux/rewrite_dirs.py b/build/linux/rewrite_dirs.py
index 9e166d0efd1b3d889ae689b3a2f7777c05e88613..7f422a68bd26c24843e5e6d234aa8026b681b758 100755
--- a/build/linux/rewrite_dirs.py
+++ b/build/linux/rewrite_dirs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -31,6 +31,7 @@ def RewritePath(path, opts):
else:
return path
+
def RewriteLine(line, opts):
"""Rewrites all the paths in recognized options."""
args = line.split()
@@ -53,6 +54,7 @@ def RewriteLine(line, opts):
return ' '.join(args)
+
def main(argv):
parser = optparse.OptionParser()
parser.add_option('-s', '--sysroot', default='/', help='sysroot to prepend')
@@ -64,5 +66,6 @@ def main(argv):
print line
return 0
+
if __name__ == '__main__':
sys.exit(main(sys.argv))

Powered by Google App Engine
This is Rietveld 408576698