From 0fed122a992d30e84ab4920aa564d67e8da3c0ab Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Sat, 3 Dec 2016 19:07:34 +0000 Subject: [PATCH] Revert "Added storage default help function" This reverts commit 42947934520d1ca0f151650fbb52f5256f47cfe7. --- plugins/storage/commands | 17 +++++++++++++++-- plugins/storage/functions | 19 ------------------- plugins/storage/subcommands/default | 12 ------------ 3 files changed, 15 insertions(+), 33 deletions(-) delete mode 100644 plugins/storage/subcommands/default diff --git a/plugins/storage/commands b/plugins/storage/commands index 03d73207f..337f07473 100755 --- a/plugins/storage/commands +++ b/plugins/storage/commands @@ -1,13 +1,26 @@ #!/usr/bin/env bash [[ " storage:help help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions" case "$1" in help | storage:help) + help_content_func () { + declare desc="return storage plugin help content" + cat<, List bind mounts for app's container(s) (host:container) + storage:mount , Create a new bind mount + storage:unmount , Remove an existing bind mount +help_content + } if [[ $1 = "shell:help" ]] ; then - help_formatted + echo -e 'Usage: dokku storage:COMMAND' + echo '' + echo 'Mount local volume / directories inside containers.' + echo '' + echo 'Additional commands:' + help_content_func | sort | column -c2 -t -s, else help_content_func fi diff --git a/plugins/storage/functions b/plugins/storage/functions index 02752b0bc..767059f13 100755 --- a/plugins/storage/functions +++ b/plugins/storage/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 storage:COMMAND' - echo '' - echo 'Mount local volume / directories inside containers.' - echo '' - echo 'Additional commands:' - help_content_func | sort | column -c2 -t -s, -} - -help_content_func () { - declare desc="return storage plugin help content" - cat<, List bind mounts for app's container(s) (host:container) - storage:mount , Create a new bind mount - storage:unmount , Remove an existing bind mount -help_content - } - verify_paths() { declare desc="verifies storage paths" echo "$1" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon." diff --git a/plugins/storage/subcommands/default b/plugins/storage/subcommands/default deleted file mode 100644 index 764a9f5a0..000000000 --- a/plugins/storage/subcommands/default +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" -source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions" - -storage_main_cmd() { - declare desc="Display storage plugin help content" - local cmd="storage" - help_formatted -} - -storage_main_cmd "$@"