OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 # Copyright 2008, Google Inc. | 2 # Copyright 2008, Google Inc. |
3 # All rights reserved. | 3 # 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. |
11 # * Redistributions in binary form must reproduce the above | 11 # * Redistributions in binary form must reproduce the above |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 def UpdateFileWithChangeList(src_file, dst_file, change_list): | 72 def UpdateFileWithChangeList(src_file, dst_file, change_list): |
73 data = open(src_file).read() | 73 data = open(src_file).read() |
74 data = UpdateData(data, change_list) | 74 data = UpdateData(data, change_list) |
75 open(dst_file, 'w').write(data) | 75 open(dst_file, 'w').write(data) |
76 | 76 |
77 if __name__ == '__main__': | 77 if __name__ == '__main__': |
78 for src_file, dst_file, cl in FILE_MODIFICATIONS: | 78 for src_file, dst_file, cl in FILE_MODIFICATIONS: |
79 UpdateFileWithChangeList(src_file, dst_file, cl) | 79 UpdateFileWithChangeList(src_file, dst_file, cl) |
80 sys.exit(0) | 80 sys.exit(0) |
OLD | NEW |