diff options
Diffstat (limited to 'packaging/build/build-cli.sh')
| -rwxr-xr-x | packaging/build/build-cli.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packaging/build/build-cli.sh b/packaging/build/build-cli.sh index b697f10..b6bd563 100755 --- a/packaging/build/build-cli.sh +++ b/packaging/build/build-cli.sh @@ -50,6 +50,15 @@ run_venv -m meshbay_cli.manpage | gzip -9n > "$ROOT/usr/share/man/man1/meshbay-c [ "$(gzip -dc "$ROOT/usr/share/man/man1/meshbay-cli.1.gz" | head -c 3)" = ".TH" ] || { echo "!! the man page did not generate" >&2; exit 1; } +# bash-completion loads it the first time Tab is pressed after `meshbay-cli`. +echo " generating the bash completion" +COMPLETIONS="$ROOT/usr/share/bash-completion/completions" +mkdir -p "$COMPLETIONS" +MESHBAY_CLI_HOME="$STAGING/cli-home" run_venv -m meshbay_cli completion bash \ + > "$COMPLETIONS/meshbay-cli" +grep -q '^complete -F _meshbay_cli meshbay-cli$' "$COMPLETIONS/meshbay-cli" || { + echo "!! the bash completion did not generate" >&2; exit 1; } + # --- The CLI and its own dependencies, out of the common tree --------------- # MOVE (not copy), as build-hub.sh and build-node.sh do: dpkg/rpm then know # these files belong to meshbay-cli. The list is kept for the maintainer |