Skip to content

Commit f28becd

Browse files
committed
revert: mapfile to declare
1 parent 5eeb9b5 commit f28becd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lgsm/modules/command_backup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,15 @@ fn_backup_prune() {
190190
fn_backup_relpath() {
191191
# Written by CedarLUG as a "realpath --relative-to" alternative in bash.
192192
# Populate an array of tokens initialized from the rootdir components.
193-
mapfile -t rdirtoks < <(readlink -f "${rootdir}" | sed "s/\// /g")
193+
declare -a rdirtoks=($(readlink -f "${rootdir}" | sed "s/\// /g"))
194194
if [ ${#rdirtoks[@]} -eq 0 ]; then
195195
fn_print_fail_nl "Problem assessing rootdir during relative path assessment"
196196
fn_script_log_fail "Problem assessing rootdir during relative path assessment: ${rootdir}"
197197
core_exit.sh
198198
fi
199199

200200
# Populate an array of tokens initialized from the backupdir components.
201-
mapfile -t bdirtoks < <(readlink -f "${backupdir}" | sed "s/\// /g")
201+
declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g"))
202202
if [ ${#bdirtoks[@]} -eq 0 ]; then
203203
fn_print_fail_nl "Problem assessing backupdir during relative path assessment"
204204
fn_script_log_fail "Problem assessing backupdir during relative path assessment: ${rootdir}"

0 commit comments

Comments
 (0)