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

Unified Diff: build/util/remove_file.py

Issue 23301019: Remove third_party/cld2 once (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace 'rm' with a python script (we can't use 'rm' on Windows) Created 7 years, 4 months 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
« DEPS ('K') | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« DEPS ('K') | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698