From 010c89e8104dafa0b2b9fcfae6d008af33306d64 Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Sat, 3 Dec 2016 19:08:02 +0000 Subject: [PATCH] Revert "Added ssh-keys default help function" This reverts commit 74db5b9d3bd57501227a8bbf71c5c09573af7127. --- plugins/ssh-keys/commands | 18 +++++++++++++++--- plugins/ssh-keys/functions | 19 ------------------- plugins/ssh-keys/subcommands/default | 12 ------------ 3 files changed, 15 insertions(+), 34 deletions(-) delete mode 100644 plugins/ssh-keys/subcommands/default diff --git a/plugins/ssh-keys/commands b/plugins/ssh-keys/commands index a205bd054..bfd36a0ce 100755 --- a/plugins/ssh-keys/commands +++ b/plugins/ssh-keys/commands @@ -1,14 +1,26 @@ #!/usr/bin/env bash [[ " help ssh-keys:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions" case "$1" in help | ssh-keys:help) - + help_content_func () { + declare desc="return ssh-keys plugin help content" + cat< [/path/to/key], Add a new public key by pipe or path + ssh-keys:remove , Remove SSH public key by name +help_content + } if [[ $1 = "ssh-keys:help" ]] ; then - help_formatted + echo -e 'Usage: dokku ssh-keys[:COMMAND]' + echo '' + echo 'Manage public ssh keys that are allowed to connect to Dokku' + echo '' + echo 'Additional commands:' + help_content_func | sort | column -c2 -t -s, else help_content_func fi diff --git a/plugins/ssh-keys/functions b/plugins/ssh-keys/functions index 262eacc44..24b5e6807 100755 --- a/plugins/ssh-keys/functions +++ b/plugins/ssh-keys/functions @@ -2,25 +2,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" -help_formatted (){ - echo -e 'Usage: dokku ssh-keys[:COMMAND]' - echo '' - echo 'Manage public ssh keys that are allowed to connect to Dokku' - echo '' - echo 'Additional commands:' - help_content_func | sort | column -c2 -t -s, -} - -help_content_func () { - declare desc="return ssh-keys plugin help content" - cat< [/path/to/key], Add a new public key by pipe or path - ssh-keys:remove , Remove SSH public key by name -help_content - } - verify_ssh_key_file() { declare desc="Test that public key is valid" [[ -s ${DOKKU_ROOT}/.ssh/authorized_keys ]] || dokku_log_fail "No public keys found." diff --git a/plugins/ssh-keys/subcommands/default b/plugins/ssh-keys/subcommands/default deleted file mode 100644 index 9b31420a5..000000000 --- a/plugins/ssh-keys/subcommands/default +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_AVAILABLE_PATH/config/functions" -source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions" - -ssh_keys_main_cmd() { - declare desc="return ssh-keys plugin help content" - local cmd="ssh-keys" - help_formatted -} - -ssh_keys_main_cmd "$@"