Skip to content

Commit ec10041

Browse files
committed
Call bootstrap scripts with a tty
Inspired by #449 but using read instead of mapfile to make it work with bash 3. Fixes #344.
1 parent 3a1b236 commit ec10041

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

contrib/bootstrap/bootstrap-in-dir

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ if [[ ! -d "$BOOTSTRAP_D" ]]; then
1414
exit 1
1515
fi
1616

17-
find -L "$BOOTSTRAP_D" -type f | sort | while IFS= read -r bootstrap; do
18-
if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ "~$" ]]; then
19-
if ! "$bootstrap"; then
20-
echo "Error: bootstrap '$bootstrap' failed" >&2
21-
exit 1
22-
fi
17+
declare -a bootstraps
18+
while IFS= read -r bootstrap; do
19+
if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ ~$ ]]; then
20+
bootstraps+=("$bootstrap")
21+
fi
22+
done < <(find -L "$BOOTSTRAP_D" -type f | sort)
23+
24+
for bootstrap in "${bootstraps[@]}"; do
25+
if ! "$bootstrap"; then
26+
echo "Error: bootstrap '$bootstrap' failed" >&2
27+
exit 1
2328
fi
2429
done

0 commit comments

Comments
 (0)