diff --git a/subcommands/clone b/subcommands/clone index 04a369e..1901dfa 100755 --- a/subcommands/clone +++ b/subcommands/clone @@ -9,9 +9,14 @@ service-clone-cmd() { #E dokku $PLUGIN_COMMAND_PREFIX:clone lolipop lolipop-2 #A service, service to run command against #A new-service, name of new service + #F -c|--custom-env "USER=alpha;HOST=beta", semi-colon delimited environment variables to start the service with + #F -i|--image IMAGE, the image name to start the service with + #F -i|--image-version IMAGE_VERSION, the image version to start the service with + #F -p|--password PASSWORD, override the user-level service password + #F -r|--root-password PASSWORD, override the root-level service password declare desc="create container then copy data from into " local cmd="$PLUGIN_COMMAND_PREFIX:clone" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 - declare SERVICE="$1" NEW_SERVICE="$2" CLONE_FLAGS_LIST="${@:3}" + declare SERVICE="$1" NEW_SERVICE="$2" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" @@ -25,6 +30,8 @@ service-clone-cmd() { PLUGIN_IMAGE=$(service_version "$SERVICE" | grep -o "^.*:" | sed -r "s/://g") PLUGIN_IMAGE_VERSION=$(service_version "$SERVICE" | grep -o ":.*$" | sed -r "s/://g") + service_parse_args "${@:3}" + dokku_log_info2 "Cloning $SERVICE to $NEW_SERVICE" service_create "$NEW_SERVICE" "${@:3}" dokku_log_info1 "Copying data from $SERVICE to $NEW_SERVICE"