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
1 changed files with 11 additions and 6 deletions
|
@ -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 a new issue