| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (C) 2010 Google Inc. All rights reserved. | 3 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 | 45 |
| 46 def write_devtools_html(inspector_file, devtools_file, debug): | 46 def write_devtools_html(inspector_file, devtools_file, debug): |
| 47 for line in inspector_file: | 47 for line in inspector_file: |
| 48 if not debug and '<script ' in line: | 48 if not debug and '<script ' in line: |
| 49 continue | 49 continue |
| 50 if not debug and '<link ' in line: | 50 if not debug and '<link ' in line: |
| 51 continue | 51 continue |
| 52 if '</head>' in line and not debug: | 52 if '</head>' in line and not debug: |
| 53 devtools_file.write(generate_include_tag("inspector.css")) | 53 devtools_file.write(generate_include_tag("inspector.css")) |
| 54 devtools_file.write(generate_include_tag("inspector.js")) | 54 devtools_file.write(generate_include_tag("Main.js")) |
| 55 devtools_file.write(line) | 55 devtools_file.write(line) |
| 56 if '<head>' in line: | 56 if '<head>' in line: |
| 57 devtools_file.write(generate_include_tag("buildSystemOnly.js")) | 57 devtools_file.write(generate_include_tag("buildSystemOnly.js")) |
| 58 | 58 |
| 59 | 59 |
| 60 def main(argv): | 60 def main(argv): |
| 61 | 61 |
| 62 if len(argv) < 4: | 62 if len(argv) < 4: |
| 63 print('usage: %s inspector_html devtools_html debug' % argv[0]) | 63 print('usage: %s inspector_html devtools_html debug' % argv[0]) |
| 64 return 1 | 64 return 1 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 78 inspector_html.close() | 78 inspector_html.close() |
| 79 | 79 |
| 80 # Touch output file directory to make sure that Xcode will copy | 80 # Touch output file directory to make sure that Xcode will copy |
| 81 # modified resource files. | 81 # modified resource files. |
| 82 if sys.platform == 'darwin': | 82 if sys.platform == 'darwin': |
| 83 output_dir_name = os.path.dirname(devtools_html_name) | 83 output_dir_name = os.path.dirname(devtools_html_name) |
| 84 os.utime(output_dir_name, None) | 84 os.utime(output_dir_name, None) |
| 85 | 85 |
| 86 if __name__ == '__main__': | 86 if __name__ == '__main__': |
| 87 sys.exit(main(sys.argv)) | 87 sys.exit(main(sys.argv)) |
| OLD | NEW |