From: Kevin Day Date: Sat, 10 Jan 2026 22:46:14 +0000 (-0600) Subject: Feature: Add support for debug mode in bootstrap example script. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=e25e31f29fe41d0e32a2a8fd6a5d903d2f59584f;p=fll Feature: Add support for debug mode in bootstrap example script. I use this script a lot for convenience. Add support for enabling debug mode when building via the `-D` parameter. --- diff --git a/build/scripts/bootstrap-example.sh b/build/scripts/bootstrap-example.sh index 521f94826..c9437f2d9 100644 --- a/build/scripts/bootstrap-example.sh +++ b/build/scripts/bootstrap-example.sh @@ -8,9 +8,11 @@ # # 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. -# 3) Optional, may be one of: -w, --work, -A, -P, -X. -# 4) Optional, may be: clang. +# 2) Optional, may be one or more of: +# +d, +l, +n, +V, +Q, +E, +N, +D, +# --enable-shared, --enable-static, --disable-shared, --disable-static, +# -w, --work, -A, -D, -P, -X, +# clang. # # Modes: # - "individual" @@ -33,6 +35,8 @@ # # The -A represents building with android mode. # +# The -D represents building with debug mode. +# # The -P represents building with pinephone mode. # # The -X represents excluding a program when building. @@ -65,6 +69,8 @@ main() { local mode_compiler_value="gcc" local mode_custom_param= local mode_custom_value= + local mode_debug_param= + local mode_debug_value= local mode_part= local mode_parameter= local mode_path= @@ -125,6 +131,9 @@ main() { elif [[ ${p} == "-A" ]] ; then mode_custom_param="-m" mode_custom_value="android" + elif [[ ${p} == "-D" ]] ; then + mode_debug_param="-m" + mode_debug_value="debug" elif [[ ${p} == "-P" ]] ; then mode_custom_param="-m" mode_custom_value="pinephone" @@ -180,7 +189,7 @@ boostrap_process() { ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m individual -m individual_thread ${mode_thread_param} ${mode_thread_value} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m individual -m individual_thread ${mode_debug_param} ${mode_debug_value} ${mode_thread_param} ${mode_thread_value} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} && @@ -198,7 +207,7 @@ boostrap_process() { ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_debug_param} ${mode_debug_value} ${mode_thread_param} ${mode_thread_value} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} && @@ -208,7 +217,7 @@ boostrap_process() { ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_debug_param} ${mode_debug_value} ${mode_thread_param} ${mode_thread_value} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} && @@ -218,7 +227,7 @@ boostrap_process() { ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_debug_param} ${mode_debug_value} ${mode_thread_param} ${mode_thread_value} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} @@ -232,7 +241,7 @@ boostrap_process() { ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m monolithic ${mode_thread_param} ${mode_thread_value} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m monolithic ${mode_debug_param} ${mode_debug_value} ${mode_thread_param} ${mode_thread_value} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} @@ -290,7 +299,7 @@ boostrap_process() { ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${mode_debug_param} ${mode_debug_value} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} @@ -352,7 +361,7 @@ boostrap_process() { ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${mode_debug_param} ${mode_debug_value} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} @@ -363,7 +372,7 @@ boostrap_process() { if [[ ${i} == "${j}-${version}" ]] ; then cd ${path_original}package/program/${i} && - fake clean make ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && + fake clean make ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${mode_debug_param} ${mode_debug_value} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_custom_param} ${mode_custom_value} ${mode_compiler_param} ${mode_compiler_value} && ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work}