diff options
author | Justus Winter <justus@pep-project.org> | 2017-12-21 16:31:44 +0100 |
---|---|---|
committer | Justus Winter <justus@pep-project.org> | 2017-12-21 18:02:35 +0100 |
commit | b6fae6ab962f0061f18158d04c4ef6a7d06498cf (patch) | |
tree | 3702a1234e4e25e06f682681c7ea799ef49131eb /tool/make-usage.sh | |
parent | f2e693585e65d8c4873f5bbef8fd32c93e7a2d9e (diff) |
tool: New crate.
- A command line tool to interact with Sequoia. Useful for
debugging and development.
Diffstat (limited to 'tool/make-usage.sh')
-rw-r--r-- | tool/make-usage.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tool/make-usage.sh b/tool/make-usage.sh new file mode 100644 index 00000000..bc150a75 --- /dev/null +++ b/tool/make-usage.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +quote() { + sed 's@^@//! @' | sed 's/ $//' +} + +begin_code() { + printf '```text\n' +} + +end_code() { + printf '```\n' +} + +( + printf "A command-line frontend for Sequoia. + +# Usage + +" + begin_code + sq --help + end_code + + sq --help | + sed -n '/^SUBCOMMANDS:/,$p' | + tail -n+2 | + while read command desc + do + if [ "$command" = help ]; then + continue + fi + + printf "\n## Subcommand $command\n\n" + begin_code + sq $command --help + end_code + done +) | quote + +printf '\ninclude!("main.rs");\n' |