use declare for description variable
This commit is contained in:
@@ -3,19 +3,19 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
verify_paths() {
|
||||
local desc="verifies storage paths"
|
||||
declare desc="verifies storage paths"
|
||||
echo "$1" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon."
|
||||
}
|
||||
|
||||
check_if_path_exists() {
|
||||
local desc="checks if path exists"
|
||||
declare desc="checks if path exists"
|
||||
local -r passed_path=$1
|
||||
local -r phase_file_path=$2
|
||||
[[ -r "$phase_file_path" ]] && grep -qe "^-v $passed_path" "$phase_file_path"
|
||||
}
|
||||
|
||||
get_bind_mounts() {
|
||||
local desc="strips docker options and prints mounts"
|
||||
declare desc="strips docker options and prints mounts"
|
||||
local -r phase_file_path=$1
|
||||
[[ -r "$phase_file_path" ]] && sed -e '/^-v/!d' -e 's/^-v/ /' < "$phase_file_path"
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
storage_list_cmd() {
|
||||
local desc="List all bound mounts"
|
||||
declare desc="List all bound mounts"
|
||||
local cmd="storage:list"
|
||||
local passed_phases="deploy"
|
||||
[[ ! $2 ]] && dokku_log_fail "storage:list requires an app to list."
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
storage_mount_cmd() {
|
||||
local desc="Add bind-mount, redeploy app if running"
|
||||
declare desc="Add bind-mount, redeploy app if running"
|
||||
local cmd="storage:mount"
|
||||
local passed_phases=(deploy run)
|
||||
[[ -z $3 || $4 ]] && dokku_log_fail "storage:mount requires an app and a two paths divided by colon."
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
storage_unmount_cmd() {
|
||||
local desc="Remove bind-mount, restart app if running"
|
||||
declare desc="Remove bind-mount, restart app if running"
|
||||
local cmd="storage:unmount"
|
||||
local passed_phases=(deploy run)
|
||||
[[ -z $3 || $4 ]] && dokku_log_fail "storage:unmount requires an app and a two paths divided by colon."
|
||||
|
||||
Reference in New Issue
Block a user