From 3dc0240f5e01f9ade6ebca55bc8b3fcf94375fdb Mon Sep 17 00:00:00 2001 From: randomgeek78 <66195352+randomgeek78@users.noreply.github.com> Date: Thu, 28 Oct 2021 09:46:23 -0700 Subject: [PATCH] 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. --- contrib/bootstrap/bootstrap-in-dir | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/bootstrap/bootstrap-in-dir b/contrib/bootstrap/bootstrap-in-dir index 8955641..45a8bf5 100755 --- a/contrib/bootstrap/bootstrap-in-dir +++ b/contrib/bootstrap/bootstrap-in-dir @@ -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)