0301e91b94
Also, add build rule to delete old dart2js scripts. Review URL: https://codereview.chromium.org//11446040 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15841 260f80e4-7a28-3924-810f-c04153c831b5
29 lines
673 B
Python
29 lines
673 B
Python
#!/usr/bin/env python
|
|
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
'''
|
|
Tool for deleting files given on the command line, and touching a
|
|
file on success.
|
|
|
|
Usage:
|
|
python tools/list_files.py FILE_TO_TOUCH FILES_TO_DELETE...
|
|
'''
|
|
|
|
import os
|
|
import sys
|
|
|
|
|
|
def main(argv):
|
|
file_to_touch = argv[1]
|
|
for filename in argv[2:]:
|
|
if os.path.exists(filename):
|
|
os.remove(filename)
|
|
with file(file_to_touch, 'a'):
|
|
os.utime(file_to_touch, None)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main(sys.argv))
|