From b0da5b06e56969b498495cc46a667ae1d0b2297e Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 20 Feb 2024 20:02:38 -0600 Subject: [PATCH] Update: Add the ability to explicitly skip a program. The controller program is not yet migrated to compile under 0.7.x. This adds the ability to the bootstrap example script to allow for simply skipping packages. --- build/scripts/bootstrap-example.sh | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/build/scripts/bootstrap-example.sh b/build/scripts/bootstrap-example.sh index 9304000..e492dc0 100644 --- a/build/scripts/bootstrap-example.sh +++ b/build/scripts/bootstrap-example.sh @@ -8,7 +8,7 @@ # # This only accepts one argument, followed by these optional arguments: # 1) One of "Modes" from below. -# 2) Optional, may be one of: +d, +l, +n, +V, +Q, +E, +N, +D, --enable-shared, --enable-static, --disable-shared, --disable-static. +# 2) Optional, may be one of: +d, +l, +n, +V, +Q, +E, +N, +D, -X, --enable-shared, --enable-static, --disable-shared, --disable-static. # 3) Optional, may be one of: -w, --work. # 4) Optional, may be: clang. # @@ -31,6 +31,8 @@ # The -w/--work requires the path to the work directory following it. # The clang parameter does not need the "-m". # +# The -X represents excluding a program when building. +# # This will create a directory at he present working directory of the script caller called "fll" where everything will be installed. # This assumes the shell script is GNU bash. # This is not intended to provide any extensive or thorough error handling. @@ -67,12 +69,16 @@ build_mode_extra_param_2= build_mode_extra_value_2= shell_command=bash suppress_first="+F" +exclude_programs= +grab_next= +skip= if [[ ${SHELL_ENGINE} == "zsh" ]] ; then shell_command=zsh fi let i=2 +let j= p= while [[ ${i} -le $# ]] ; do @@ -83,7 +89,10 @@ while [[ ${i} -le $# ]] ; do p=${!i} fi - if [[ ${p} == "+d" ]] ; then + if [[ ${grab_next} == "exclude_program" ]] ; then + exclude_programs="${exclude_programs}${p} " + grab_next= + elif [[ ${p} == "+d" ]] ; then color="+d" elif [[ ${p} == "+l" ]] ; then color="+l" @@ -104,6 +113,8 @@ while [[ ${i} -le $# ]] ; do elif [[ ${p} == "+D" ]] ; then verbose="+D" verbose_common="-v" + elif [[ ${p} == "-X" ]] ; then + grab_next="exclude_program" elif [[ ${p} == "--enable-static" ]] ; then static="--enable-static" elif [[ ${p} == "--disable-static" ]] ; then @@ -283,6 +294,23 @@ elif [[ ${1} == "programs-individual" || ${1} == "programs-level" || ${1} == "pr for i in * ; do + skip= + + for j in ${exclude_programs} ; do + if [[ ${i} == "${j}-${version}" ]] ; then + skip="true" + + break + fi + done + + if [[ $skip != "" ]] ; then + echo "Skipping program: '${i}'." + echo + + continue + fi + cd ${path_original}package/program/${i} && ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && -- 1.8.3.1