tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

get_tool_mtime.py (593B)


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