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

Unified Diff: infra/tools/new_tool/__main__.py

Issue 1172053003: Created infra/tools/new_tool (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 5 years, 6 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
Index: infra/tools/new_tool/__main__.py
diff --git a/infra/tools/new_tool/__main__.py b/infra/tools/new_tool/__main__.py
new file mode 100644
index 0000000000000000000000000000000000000000..8a0f5e99a9837f96dc4f1ebb60bf245c74efa758
--- /dev/null
+++ b/infra/tools/new_tool/__main__.py
@@ -0,0 +1,24 @@
+# Copyright 2015 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.
+
+"""Generate a new tool in infra/tools."""
+
+import argparse
+import sys
+
+from infra.tools.new_tool import new_tool
+
+
+def main(argv):
+ parser = argparse.ArgumentParser(
+ prog='new_tool',
+ description=sys.modules['__main__'].__doc__)
+ new_tool.add_argparse_options(parser)
+ args = parser.parse_args(argv)
+
+ return new_tool.generate_tool_files(args.name[0], args.base_dir)
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))

Powered by Google App Engine
This is Rietveld 408576698