feat: add support for enhanced help output

This commit is contained in:
Jose Diaz-Gonzalez
2017-09-11 01:25:34 -04:00
parent bad012bde2
commit 00f9cb8b62
28 changed files with 564 additions and 230 deletions

View File

@@ -4,14 +4,17 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_BASE_PATH/common/functions"
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"
postgres-clone-cmd() {
service-clone-cmd() {
#E you can clone an existing service to a new one
#E dokku $PLUGIN_COMMAND_PREFIX:clone lolipop lolipop-2
#A service, service to run command against
#A new-service, name of new service
declare desc="create container <new-name> then copy data from <name> into <new-name>"
local cmd="$PLUGIN_COMMAND_PREFIX:clone" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1
declare SERVICE="$1" NEW_SERVICE="$2"
declare SERVICE="$1" NEW_SERVICE="$2" CLONE_FLAGS_LIST="${@:3}"
[[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service"
[[ -z "$NEW_SERVICE" ]] && dokku_log_fail "Please specify a name for the new service"
verify_service_name "$SERVICE"
PLUGIN_IMAGE=$(service_version "$SERVICE" | grep -o "^.*:" | sed -r "s/://g")
@@ -23,4 +26,4 @@ postgres-clone-cmd() {
dokku_log_info1 "Done"
}
postgres-clone-cmd "$@"
service-clone-cmd "$@"