From: Kevin Day Date: Wed, 21 Feb 2024 02:02:38 +0000 (-0600) Subject: Update: Add the ability to explicitly skip a program. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=b0da5b06e56969b498495cc46a667ae1d0b2297e;p=fll 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. --- 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} &&