ostree: Describe subcommands in help output

Added a description argument to all type
of commands. Now when we include -h or --help
for commands that contain subcommands, the description
for those subcommands are shown.

The added subcommands help will be provided to the following commands:
- ostree -h
- ostree admin -h
- ostree admin instutil -h
- ostree remote -h
- ostree static-delta -h

Closes: #1267
Approved by: cgwalters
This commit is contained in:
Ruixin Bao authored and Atomic Bot committed 2017-10-20 12:59:32 +00:00
1 parent 2531d8fe63
commit 3c360a720f
9 files changed
+140 -67

No files matched your search

+2 -1
View File
@@ -46,7 +46,8 @@ test_recursive() {
test_usage_output out "$cmd"
assert_file_empty err
builtins=`sed -n '/^Builtin \("[^"]*" \)\?Commands:$/,/^$/p' <out | tail -n +2`
# Select the list of commands, for each line, remove the leading spaces, and take the first word(command) of each line
builtins=`sed -n '/^Builtin \("[^"]*" \)\?Commands:$/,/^$/p' <out | tail -n +2 | sed -e 's/^[[:space:]]*//' | cut -d " " -f1`
if [ "$builtins" != "" ] ; then
found_subcommands=1