Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: dart/utils/compiler/remove_old_scripts.py

Issue 11446040: Remove stale dependencies on dart2js scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/utils/compiler/compiler.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/utils/compiler/remove_old_scripts.py
diff --git a/dart/utils/compiler/remove_old_scripts.py b/dart/utils/compiler/remove_old_scripts.py
new file mode 100644
index 0000000000000000000000000000000000000000..ffa6400892ad71070ba151eb8e57603ea75e033e
--- /dev/null
+++ b/dart/utils/compiler/remove_old_scripts.py
@@ -0,0 +1,28 @@
+#!/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...
kustermann 2012/12/06 15:51:40 You should change that to "remove_old_scripts.py".
+'''
+
+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))
« no previous file with comments | « dart/utils/compiler/compiler.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698