From 3a1e09458bb42b1b8773a8f66ecaa7753d16d63b Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 8 Jun 2020 15:18:52 -0500 Subject: [PATCH] Bugfix: individual bootstrap example does not handle errors properly Double-Ampersand before a for loop does not work well in bash. Instead, return result to detect error before attempting to operate for loop. --- build/scripts/bootstrap-example.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/build/scripts/bootstrap-example.sh b/build/scripts/bootstrap-example.sh index 789f1ba..bc6cee8 100644 --- a/build/scripts/bootstrap-example.sh +++ b/build/scripts/bootstrap-example.sh @@ -20,19 +20,21 @@ install_path="${original_path}fll/" mkdir -vp $install_path if [[ $1 == "individual" ]] ; then - bash build/scripts/package.sh build -i && + bash build/scripts/package.sh build -i - for i in f_type f_status f_memory f_string f_utf f_color f_console f_conversion f_directory f_environment f_file f_fss f_path f_pipe f_print f_serialized f_socket fl_color fl_console fl_directory fl_fss fl_print fl_serialized fl_socket fl_status fl_string fl_utf fl_utf_file fll_directory fll_execute fll_file fll_fss fll_program fll_status ; do - cd package/individual/$i-$2/ && + if [[ $? -eq 0 ]] ; then + for i in f_type f_status f_memory f_string f_utf f_color f_console f_conversion f_directory f_environment f_file f_fss f_path f_pipe f_print f_serialized f_socket fl_color fl_console fl_directory fl_fss fl_print fl_serialized fl_socket fl_status fl_string fl_utf fl_utf_file fll_directory fll_execute fll_file fll_fss fll_program fll_status ; do + cd package/individual/$i-$2/ && - ./bootstrap.sh clean && + ./bootstrap.sh clean && - ./bootstrap.sh build -w $install_path -m individual && + ./bootstrap.sh build -w $install_path -m individual && - ./install.sh -w $install_path && + ./install.sh -w $install_path && - cd $original_path || break - done + cd $original_path || break + done + fi fi if [[ $1 == "level" ]] ; then -- 1.8.3.1