use declare for description variable

This commit is contained in:
Michael Hobbs
2016-03-08 15:30:34 -05:00
parent d8e00f4f8a
commit 987c5cfb9c
111 changed files with 225 additions and 225 deletions

View File

@@ -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"
}

View File

@@ -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."

View File

@@ -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."

View File

@@ -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."