blob: 2fa2e97641584957146d5614e2ee1d25270341f1 [file] [log] [blame]
Hal Canary83c2f702019-03-07 14:53:03 -05001#! /usr/bin/env python
2# Copyright 2019 Google LLC.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5import glob
6import os
7head = '''# Copyright 2019 Google LLC.
8# Use of this source code is governed by a BSD-style license that can be
9# found in the LICENSE file.
10'''
11def gni(path, name, files):
12 with open(path, 'w') as o:
13 o.write('%s\n%s = get_path_info([\n' % (head, name))
14 for x in sorted(files):
15 o.write(' "%s",\n' % x)
16 o.write('], "abspath")\n')
17if __name__ == '__main__':
18 os.chdir(os.path.dirname(__file__))
19 gni('examples.gni', 'examples_sources', glob.glob('../docs/examples/*.cpp'))