OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import os |
| 6 import sys |
| 7 |
| 8 # Usage: python get_tool_mtime.py path/to/file1.py path/to/file2.py |
| 9 # |
| 10 # Prints a GN scope with the variable name being the basename sans-extension |
| 11 # and the value being the file modification time. A variable is emitted for |
| 12 # each file argument on the command line. |
| 13 |
| 14 if __name__ == '__main__': |
| 15 for f in sys.argv[1:]: |
| 16 variable = os.path.splitext(os.path.basename(f))[0] |
| 17 print '%s = %d' % (variable, os.path.getmtime(f)) |
OLD | NEW |