Switch to mapfile instead of the default word splitting + glob

expansion.
This commit is contained in:
Jeffrey Falgout 2023-06-11 11:26:10 -06:00
parent f513c670ab
commit d149146da7
1 changed files with 1 additions and 3 deletions

View File

@ -14,9 +14,7 @@ if [[ ! -d "$BOOTSTRAP_D" ]]; then
exit 1 exit 1
fi fi
IFS=$'\n' mapfile -t bootstraps < <(find -L "$BOOTSTRAP_D" -type f | sort)
bootstraps=( $(find -L "$BOOTSTRAP_D" -type f | sort) )
unset IFS
for bootstrap in "${bootstraps[@]}"; do for bootstrap in "${bootstraps[@]}"; do
if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ "~$" ]]; then if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ "~$" ]]; then
if ! "$bootstrap"; then if ! "$bootstrap"; then