]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
wic: Add dummy subcommand and usage strings
authorTom Zanussi <tom.zanussi@linux.intel.com>
Mon, 7 Jul 2014 20:30:12 +0000 (15:30 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 10 Jul 2014 16:37:40 +0000 (17:37 +0100)
In order to reuse the existing subcommand infrastructure to display
various general-purpose help topics, add a dummy 'help_topic'
subcommand and usage string.  This allows users to invoke general help
topics by the natural form 'wic help <topic>' even though topic
doesn't correspond to a real subcommand.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
scripts/wic

index 2d3fd09d7180e7c646cf0ba430e4214ca84b3289..00eddfd7bca4355211a4af2ef5c216e28d2c2e68 100755 (executable)
@@ -226,6 +226,19 @@ def wic_list_subcommand(args, usage_str):
         sys.exit(1)
 
 
+def wic_help_topic_subcommand(args, usage_str):
+    """
+    Command-line handling for help-only 'subcommands'.  This is
+    essentially a dummy command that doesn nothing but allow users to
+    use the existing subcommand infrastructure to display help on a
+    particular topic not attached to any particular subcommand.
+    """
+    pass
+
+
+wic_help_topic_usage = """
+"""
+
 subcommands = {
     "create": [wic_create_subcommand,
                wic_create_usage,