1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2026-03-02 03:49:29 +00:00

correctly export array to subscript

* fix shellcheck errors and warnings
This commit is contained in:
Martin Zuther
2019-12-28 16:09:19 +01:00
parent 0b79b461a6
commit c190333fdf
3 changed files with 43 additions and 17 deletions

16
yadm
View File

@@ -1577,7 +1577,11 @@ function invoke_hook() {
YADM_HOOK_FULL_COMMAND=$FULL_COMMAND
YADM_HOOK_REPO=$YADM_REPO
YADM_HOOK_WORK=$YADM_WORK
YADM_ENCRYPT_INCLUDE_FILES=${ENCRYPT_INCLUDE_FILES[@]}
# pack array to export it; filenames including a newline character (\n)
# are NOT supported
YADM_ENCRYPT_INCLUDE_FILES=$(join_string $'\n' "${ENCRYPT_INCLUDE_FILES[@]}")
export YADM_HOOK_COMMAND
export YADM_HOOK_EXIT
export YADM_HOOK_FULL_COMMAND
@@ -1821,6 +1825,13 @@ function auto_bootstrap() {
}
# ****** Helper Functions ******
function join_string {
local IFS="$1"
echo "${*:2}"
}
# ****** Prerequisites Functions ******
function require_archive() {
@@ -1888,7 +1899,7 @@ function readlink_available() {
return 1
}
# ****** Directory tranlations ******
# ****** Directory translations ******
function unix_path() {
# for paths used by bash/yadm
@@ -1908,6 +1919,7 @@ function mixed_path() {
}
# ****** echo replacements ******
function echo() {
IFS=' '
printf '%s\n' "$*"