| OLD | NEW |
| (Empty) | |
| 1 #!/usr/bin/env python |
| 2 # |
| 3 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. |
| 6 |
| 7 # Updates the list of Observatory source files. |
| 8 |
| 9 import os |
| 10 import sys |
| 11 from datetime import date |
| 12 |
| 13 def getDir(rootdir, target): |
| 14 sources = [] |
| 15 for root, subdirs, files in os.walk(rootdir): |
| 16 subdirs.sort() |
| 17 files.sort() |
| 18 for f in files: |
| 19 sources.append(root + '/' + f) |
| 20 return sources |
| 21 |
| 22 def main(): |
| 23 target = open('observatory_sources.gypi', 'w') |
| 24 target.write('# Copyright (c) ') |
| 25 target.write(str(date.today().year)) |
| 26 target.write(', the Dart project authors. Please see the AUTHORS file\n'); |
| 27 target.write('# for details. All rights reserved. Use of this source code is
governed by a\n'); |
| 28 target.write('# BSD-style license that can be found in the LICENSE file.\n')
; |
| 29 target.write('\n'); |
| 30 target.write('# This file contains all dart, css, and html sources for Obser
vatory.\n'); |
| 31 target.write('{\n \'sources\': [\n') |
| 32 sources = [] |
| 33 for rootdir in ['lib', 'web']: |
| 34 sources.extend(getDir(rootdir, target)) |
| 35 sources.sort() |
| 36 for s in sources: |
| 37 if (s[-9:] != 'README.md'): |
| 38 target.write(' \'' + s + '\',\n') |
| 39 target.write(' ]\n}\n') |
| 40 target.close() |
| 41 |
| 42 if __name__ == "__main__": |
| 43 main() |
| OLD | NEW |