summaryrefslogtreecommitdiffstats
path: root/sq/make-usage.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sq/make-usage.sh')
-rw-r--r--sq/make-usage.sh54
1 files changed, 0 insertions, 54 deletions
diff --git a/sq/make-usage.sh b/sq/make-usage.sh
deleted file mode 100644
index 7bcbfcf2..00000000
--- a/sq/make-usage.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-
-tool=$1
-
-quote() {
- sed 's@^@//! @' | sed 's/ $//'
-}
-
-begin_code() {
- printf '```text\n'
-}
-
-end_code() {
- printf '```\n'
-}
-
-dump_help() { # subcommand, indentation
- if [ -z "$1" ]
- then
- printf "\n# Usage\n\n"
- set "" "#"
- else
- printf "\n$2 Subcommand$1\n\n"
- fi
-
- help="`$tool $1 --help`"
-
- begin_code
- printf "$help\n" | tail -n +2
- end_code
-
- if echo $help | fgrep -q SUBCOMMANDS
- then
- printf "$help\n" |
- sed -n '/^SUBCOMMANDS:/,$p' |
- tail -n+2 |
- grep '^ [^ ]' |
- while read subcommand desc
- do
- if [ "$subcommand" = help ]; then
- continue
- fi
-
- dump_help "$1 $subcommand" "#$2"
- done
- fi
-}
-
-(
- printf "A command-line frontend for Sequoia.\n"
- dump_help
-) | quote
-
-printf '\ninclude!("'"$(basename $tool)"'.rs");\n'