Allow interaction in bootstrap scripts

This fix enhances the bootstrap process by allowing interaction in scripts. If the bootstrap script has a `read...` command, it now works just fine.
This commit is contained in:
randomgeek78 2021-10-28 09:46:23 -07:00 committed by GitHub
parent f8abcd756b
commit 3dc0240f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -14,11 +14,12 @@ if [[ ! -d "$BOOTSTRAP_D" ]]; then
exit 1
fi
find -L "$BOOTSTRAP_D" -type f | sort | while IFS= read -r bootstrap; do
# Allow interaction in bootstrap scripts
while IFS= read -r bootstrap <&3 ; do
if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ "~$" ]]; then
if ! "$bootstrap"; then
echo "Error: bootstrap '$bootstrap' failed" >&2
exit 1
fi
fi
done
done 3< <(find -L "$BOOTSTRAP_D" -type f | sort)