Index: build/util/remove_file.py |
diff --git a/build/util/remove_file.py b/build/util/remove_file.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a3aa36f3795f5560c4975f774e6105059ff1e067 |
--- /dev/null |
+++ b/build/util/remove_file.py |
@@ -0,0 +1,29 @@ |
+#!/usr/bin/env python |
+# Copyright 2013 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+""" |
+remove_file.py -- Remove the specified directory or file |
+""" |
+ |
+import os |
+import sys |
+ |
+sys.path.append(os.path.join(os.path.dirname(__file__), 'lib', 'common')) |
Isaac (away)
2013/08/26 23:17:39
Why not use shutil?
hajimehoshi
2013/08/27 03:40:50
Done.
|
+import util |
+ |
+def main(argv=None): |
+ if argv is None: |
+ argv = sys.argv |
+ |
+ if len(argv) != 2: |
+ program = os.path.basename(__file__) |
+ sys.stderr.write('Usage: ' + program + ' PATH\n') |
+ sys.exit(1) |
+ |
+ path = argv[1] |
+ util.MaybeDelete(path) |
+ |
+if __name__ == '__main__': |
+ sys.exit(main()) |