OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Makes sure files have the right permissions. | 6 """Makes sure files have the right permissions. |
7 | 7 |
8 Some developers have broken SCM configurations that flip the svn:executable | 8 Some developers have broken SCM configurations that flip the svn:executable |
9 permission on for no good reason. Unix developers who run ls --color will then | 9 permission on for no good reason. Unix developers who run ls --color will then |
10 see .cc files in green and get confused. | 10 see .cc files in green and get confused. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 'scons', | 98 'scons', |
99 'naclsdk', | 99 'naclsdk', |
100 )) | 100 )) |
101 | 101 |
102 # File paths that contain these regexps will be whitelisted as well. | 102 # File paths that contain these regexps will be whitelisted as well. |
103 WHITELIST_REGEX = [ | 103 WHITELIST_REGEX = [ |
104 re.compile('/third_party/openssl/'), | 104 re.compile('/third_party/openssl/'), |
105 re.compile('/third_party/sqlite/'), | 105 re.compile('/third_party/sqlite/'), |
106 re.compile('/third_party/xdg-utils/'), | 106 re.compile('/third_party/xdg-utils/'), |
107 re.compile('/third_party/yasm/source/patched-yasm/config'), | 107 re.compile('/third_party/yasm/source/patched-yasm/config'), |
108 re.compile('/third_party/ffmpeg/patched-ffmpeg/tools'), | 108 re.compile('/third_party/ffmpeg/tools'), |
109 ] | 109 ] |
110 | 110 |
111 #### USER EDITABLE SECTION ENDS HERE #### | 111 #### USER EDITABLE SECTION ENDS HERE #### |
112 | 112 |
113 WHITELIST_EXTENSIONS_REGEX = re.compile(r'\.(%s)' % | 113 WHITELIST_EXTENSIONS_REGEX = re.compile(r'\.(%s)' % |
114 '|'.join(WHITELIST_EXTENSIONS)) | 114 '|'.join(WHITELIST_EXTENSIONS)) |
115 | 115 |
116 WHITELIST_FILES_REGEX = re.compile(r'(%s)$' % '|'.join(WHITELIST_FILES)) | 116 WHITELIST_FILES_REGEX = re.compile(r'(%s)$' % '|'.join(WHITELIST_FILES)) |
117 | 117 |
118 # Set to true for more output. This is set by the command line options. | 118 # Set to true for more output. This is set by the command line options. |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 success = CheckDirectory(start_dir) | 335 success = CheckDirectory(start_dir) |
336 if not success: | 336 if not success: |
337 print '\nFAILED\n' | 337 print '\nFAILED\n' |
338 return 1 | 338 return 1 |
339 print '\nSUCCESS\n' | 339 print '\nSUCCESS\n' |
340 return 0 | 340 return 0 |
341 | 341 |
342 | 342 |
343 if '__main__' == __name__: | 343 if '__main__' == __name__: |
344 sys.exit(main(sys.argv)) | 344 sys.exit(main(sys.argv)) |
OLD | NEW |