mirror of
https://github.com/TheLocehiliosan/yadm
synced 2025-06-04 08:33:57 +00:00
Call bootstrap scripts with a tty
Inspired by #449 but using read instead of mapfile to make it work with bash 3. Fixes #344.
This commit is contained in:
parent
3a1b236147
commit
ec10041024
@ -14,11 +14,16 @@ if [[ ! -d "$BOOTSTRAP_D" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find -L "$BOOTSTRAP_D" -type f | sort | while IFS= read -r bootstrap; do
|
declare -a bootstraps
|
||||||
if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ "~$" ]]; then
|
while IFS= read -r bootstrap; do
|
||||||
if ! "$bootstrap"; then
|
if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ ~$ ]]; then
|
||||||
echo "Error: bootstrap '$bootstrap' failed" >&2
|
bootstraps+=("$bootstrap")
|
||||||
exit 1
|
fi
|
||||||
fi
|
done < <(find -L "$BOOTSTRAP_D" -type f | sort)
|
||||||
|
|
||||||
|
for bootstrap in "${bootstraps[@]}"; do
|
||||||
|
if ! "$bootstrap"; then
|
||||||
|
echo "Error: bootstrap '$bootstrap' failed" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user