Index: tools/clang/scripts/update.py |
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py |
old mode 100644 |
new mode 100755 |
index 887b089b1c2059580c77fd935ca0ce3175db4f96..cffecf0c1b596fbb42198e134681014a1cf219dd |
--- a/tools/clang/scripts/update.py |
+++ b/tools/clang/scripts/update.py |
@@ -1,4 +1,4 @@ |
-#!/usr/bin/python |
+#!/usr/bin/env python |
# Copyright (c) 2011 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. |
@@ -10,9 +10,10 @@ import os |
import subprocess |
import sys |
-if __name__ == '__main__': |
+ |
+def main(): |
if sys.platform in ['win32', 'cygwin']: |
- sys.exit(0) |
+ return 0 |
# This script is called by gclient. gclient opens its hooks subprocesses with |
# (stdout=subprocess.PIPE, stderr=subprocess.STDOUT) and then does custom |
@@ -24,6 +25,10 @@ if __name__ == '__main__': |
# is writable, try |
# fd2 = os.dup(sys.stdin.fileno()); os.write(fd2, 'hi') |
# TODO: Fix gclient instead, http://crbug.com/95350 |
- subprocess.call( |
+ return subprocess.call( |
[os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:], |
stderr=sys.stdin) |
+ |
+ |
+if __name__ == '__main__': |
+ sys.exit(main()) |