diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-09 14:48:45 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-09 14:48:45 +0000 |
commit | 0f8171ef4747858c9702005cf73e4890e9cfb931 (patch) | |
tree | 76b632271528b76bb9d97d930f37a669c0a8c04d /webkit/build | |
parent | a2094171817c406b5140e32eaf1ad80156e3f3f1 (diff) | |
download | chromium_src-0f8171ef4747858c9702005cf73e4890e9cfb931.zip chromium_src-0f8171ef4747858c9702005cf73e4890e9cfb931.tar.gz chromium_src-0f8171ef4747858c9702005cf73e4890e9cfb931.tar.bz2 |
Fix python scripts in src/webkit
Make sure that:
- shebang is only present for executable files
- shebang is #!/usr/bin/env python
- __main__ is only present for executable files
- file's executable bit is coherent
Also fix EOF LF to be only one.
TBR=dpranke@chromium.org
BUG=105108
TEST=
Review URL: http://codereview.chromium.org/8678022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116864 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/build')
-rwxr-xr-x | webkit/build/webkit_version.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/webkit/build/webkit_version.py b/webkit/build/webkit_version.py index 7fdf9b32..ad07f0d 100755 --- a/webkit/build/webkit_version.py +++ b/webkit/build/webkit_version.py @@ -1,5 +1,5 @@ -#!/usr/bin/python -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +#!/usr/bin/env python +# Copyright (c) 2012 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. @@ -49,6 +49,7 @@ def ReadVersionFile(fname): assert(major >= 0 and minor >= 0) return (major, minor) + def GetWebKitRevision(webkit_dir, version_file): """Get the WebKit revision, in the form 'trunk@1234'.""" @@ -95,10 +96,12 @@ def EmitVersionHeader(webkit_dir, version_file, output_dir): """ % (version_file, major, minor, webkit_revision) f.write(template) f.close() + return 0 + def main(): - EmitVersionHeader(*sys.argv[1:]) + return EmitVersionHeader(*sys.argv[1:]) if __name__ == "__main__": - main() + sys.exit(main()) |