From: Kevin Day Date: Thu, 23 May 2024 03:18:56 +0000 (-0500) Subject: Cleanup: Remove first/last backported printing code. X-Git-Tag: 0.6.10^0 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=05e440a2eac351c873340d02b6ea4c496b98ea8f;p=fll Cleanup: Remove first/last backported printing code. The first/last code was backported in the past to make the scripts more forward-compatible. I have decided to remove the first/last printing feature after significant testing and review. The 0.7 development and later no longer has the first/last and so the backported code is no longer needed. --- diff --git a/build/scripts/bootstrap-example.sh b/build/scripts/bootstrap-example.sh index 2398fc9..e7c4f86 100644 --- a/build/scripts/bootstrap-example.sh +++ b/build/scripts/bootstrap-example.sh @@ -68,7 +68,6 @@ build_mode_extra_value_1= build_mode_extra_param_2= build_mode_extra_value_2= shell_command=bash -suppress_first="" exclude_programs= grab_next= skip= @@ -150,11 +149,11 @@ if [[ ${1} == "individual" ]] ; then cd package/individual/${i}-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m individual -m individual_thread ${mode_thread_param} ${mode_thread_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_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} && + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} && cd ${path_original} || break done @@ -166,31 +165,31 @@ if [[ ${1} == "level" ]] ; then cd package/level/fll-level_0-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} && + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} && cd ${path_original} && cd package/level/fll-level_1-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} && + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} && cd ${path_original} && cd package/level/fll-level_2-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} fi if [[ ${1} == "monolithic" ]] ; then @@ -198,11 +197,11 @@ if [[ ${1} == "monolithic" ]] ; then cd package/monolithic/fll-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m monolithic ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m monolithic ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${suppress_first} ${static} -w ${path_work} + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} fi # The following in an example on building individual projects. @@ -254,11 +253,11 @@ if [[ ${mode_part} != "" ]] ; then cd package/${mode_path}/${mode_part}-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${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_compiler_param} ${mode_compiler_value} && + ${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_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} # The following in an example on building all FLL program projects using the project bootstrapped from above. elif [[ ${1} == "programs-individual" || ${1} == "programs-level" || ${1} == "programs-monolithic" ]] ; then @@ -314,11 +313,11 @@ elif [[ ${1} == "programs-individual" || ${1} == "programs-level" || ${1} == "pr cd ${path_original}package/program/${i} && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${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_compiler_param} ${mode_compiler_value} && + ${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_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} || + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} || break done diff --git a/build/scripts/bootstrap.sh b/build/scripts/bootstrap.sh index 807c908..73328e9 100644 --- a/build/scripts/bootstrap.sh +++ b/build/scripts/bootstrap.sh @@ -61,8 +61,6 @@ bootstrap_main() { local path_sources=sources/ local path_language=c/ local path_work= - local print_line_first="yes" - local print_line_last="yes" local project_built= local project_built_shared= local project_built_static= @@ -193,11 +191,6 @@ bootstrap_main() { p= fi - if [[ ${verbosity} == "quiet" ]] ; then - print_line_first="no" - print_line_last="no" - fi - # If the settings_name has a directory separator, then assume it is a path to the settings file. if [[ $(echo ${settings_name} | grep -s -o '/') == "" ]] ; then settings_file="${path_data}build/${settings_name}" @@ -236,11 +229,7 @@ bootstrap_main() { for mode in ${modes} ; do if [[ $(echo "${mode}" | grep -s -o "[^_[:alnum:]+-]") != "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The mode ${c_notice}${mode}${c_error} includes invalid characters, only alphanumeric, underscore, minus, and plus are allowed.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -276,11 +265,7 @@ bootstrap_main() { if [[ ${modes_available} == "" ]] ; then if [[ ${modes} != "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not a valid modes, there are no available modes.${c_error}${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -305,11 +290,7 @@ bootstrap_main() { if [[ ${i} -eq 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not valid modes, they must be one of: ${c_notice}${modes_available}${c_error}.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -321,11 +302,7 @@ bootstrap_main() { bootstrap_id "build_name" if [[ ${variables[${key}]} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The required setting '${c_notice}build_name${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -336,11 +313,7 @@ bootstrap_main() { bootstrap_id "version_major" if [[ ${variables[${key}]} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The required setting '${c_notice}version_major${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -351,11 +324,7 @@ bootstrap_main() { bootstrap_id "version_minor" if [[ ${variables[${key}]} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The required setting '${c_notice}version_minor${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -366,11 +335,7 @@ bootstrap_main() { bootstrap_id "version_micro" if [[ ${variables[${key}]} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The required setting '${c_notice}version_micro${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -380,11 +345,7 @@ bootstrap_main() { if [[ ${path_data} == "" || ! -d ${path_data} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The data directory ${c_notice}${path_data}${c_error} is not a valid directory.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -394,11 +355,7 @@ bootstrap_main() { if [[ ${path_sources} == "" || ! -d ${path_sources} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The sources directory ${c_notice}${path_sources}${c_error} is not a valid directory.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -408,11 +365,7 @@ bootstrap_main() { if [[ ${path_work} != "" && ! -d ${path_work} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The work directory ${c_notice}${path_work}${c_error} is not a valid directory.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -440,11 +393,7 @@ bootstrap_main() { if [[ ${operation_failure} == "fail-multiple" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Only one operation may be specified at a time.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -452,8 +401,6 @@ bootstrap_main() { return 1 elif [[ ${operation} == "build" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - bootstrap_print_first - echo -e "${c_highlight}Building:${c_reset} ${c_notice}${project_label}${c_highlight} with modes: ${c_notice}${modes}${c_highlight}.${c_reset}" fi @@ -476,16 +423,12 @@ bootstrap_main() { fi elif [[ ${operation} == "clean" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - bootstrap_print_first - echo -e "${c_highlight}Cleaning Project:${c_reset} ${c_notice}${project_label}${c_highlight}.${c_reset}" fi bootstrap_operation_clean elif [[ ${operation} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: No operation was given.${c_reset}" fi @@ -494,11 +437,7 @@ bootstrap_main() { return 1 else if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -506,12 +445,6 @@ bootstrap_main() { return 1 fi - if [[ ${verbosity} != "quiet" ]] ; then - if [[ ${failure} -eq 1 || ${verbosity} != "error" ]] ; then - bootstrap_print_last - fi - fi - bootstrap_cleanup return 0 @@ -541,8 +474,6 @@ bootstrap_handle_colors() { bootstrap_help() { - bootstrap_print_first - echo -e "${c_title}${public_name}${c_reset}" echo -e " ${c_notice}Version ${version}${c_reset}" echo @@ -581,21 +512,15 @@ bootstrap_help() { echo -e " --${c_important}disable-shared${c_reset} Forcibly do not build shared files." echo -e " --${c_important}enable-static${c_reset} Forcibly do build static files." echo -e " --${c_important}disable-static${c_reset} Forcibly do not build static files." - - bootstrap_print_last } bootstrap_copyright() { - bootstrap_print_first - echo "Copyright © 2007-2024 Kevin Day." echo echo "Source code license lgpl-2.1-or-later." echo "Standard and specification license open-standard-license-1.0-or-later." echo "Documentation license cc-by-sa-4.0." - - bootstrap_print_last } bootstrap_id() { @@ -852,16 +777,12 @@ bootstrap_load_settings() { if [[ ! -d ${path_data}build/ ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: No build settings directory '${c_notice}${path_data}build/${c_error}' could not be found or is not a valid directory.${c_reset}" fi let failure=1 elif [[ ! -f ${settings_file} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: No settings file ${c_notice}${settings_file}${c_error} could not be found or is not a valid file.${c_reset}" fi @@ -1714,8 +1635,6 @@ bootstrap_operation_build() { if [[ ${failure} -eq 1 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Failed to build.${c_reset}" fi @@ -2815,8 +2734,6 @@ bootstrap_operation_build_validate_build() { if [[ ${build_compiler} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_compiler${c_error}' specified, such as '${c_notice}gcc${c_error}'.${c_reset}" fi @@ -2825,8 +2742,6 @@ bootstrap_operation_build_validate_build() { if [[ ${build_indexer} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_indexer${c_error}' specified, such as '${c_notice}ar${c_error}'.${c_reset}" fi @@ -2844,8 +2759,6 @@ bootstrap_operation_build_validate_paths() { if [[ ${path_sources} == "" || ! -d ${path_sources} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The sources directory ${c_notice}${path_sources}${c_error} is not a valid directory.${c_reset}" fi @@ -2854,8 +2767,6 @@ bootstrap_operation_build_validate_paths() { if [[ ${failure} -eq 0 && ${path_sources_object} != "" && ! -d ${path_sources_object} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The sources object directory ${c_notice}${path_sources_object}${c_error} is not a valid directory.${c_reset}" fi @@ -2881,8 +2792,6 @@ bootstrap_operation_build_validate_shared_static() { if [[ ${build_shared} != "yes" && ${build_static} != "yes" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, either build_shared or build_static must be set to 'yes'.${c_reset}" fi @@ -2891,8 +2800,6 @@ bootstrap_operation_build_validate_shared_static() { if [[ ${search_shared} != "yes" && ${search_static} != "yes" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, either search_shared or search_static must be set to 'yes'.${c_reset}" fi @@ -2911,8 +2818,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_script} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_script path provided: '${i}'.${c_reset}" fi @@ -2923,8 +2828,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_headers} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_headers path provided: '${i}'.${c_reset}" fi @@ -2935,8 +2838,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_library} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_library path provided: '${i}'.${c_reset}" fi @@ -2947,8 +2848,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_library_object} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_library_object path provided: '${i}'.${c_reset}" fi @@ -2959,8 +2858,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_program_object} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_program_object path provided: '${i}'.${c_reset}" fi @@ -2971,8 +2868,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_program} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_program path provided: '${i}'.${c_reset}" fi @@ -2983,8 +2878,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_documentation} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_documentation path provided: '${i}'.${c_reset}" fi @@ -2995,8 +2888,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_setting} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_setting path provided: '${i}'.${c_reset}" fi @@ -3092,22 +2983,6 @@ bootstrap_operation_clean() { fi } -bootstrap_print_first() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - fi -} - -bootstrap_print_last() { - - if [[ ${print_line_last} == "yes" ]] ; then - echo - fi -} - bootstrap_cleanup() { unset bootstrap_copyright @@ -3138,8 +3013,6 @@ bootstrap_cleanup() { unset bootstrap_operation_build_validate_shared_static unset bootstrap_operation_build_validate_sources unset bootstrap_operation_clean - unset bootstrap_print_first - unset bootstrap_print_last unset bootstrap_cleanup } diff --git a/build/scripts/generate_ctags.sh b/build/scripts/generate_ctags.sh index 0436fe7..dea025f 100644 --- a/build/scripts/generate_ctags.sh +++ b/build/scripts/generate_ctags.sh @@ -42,8 +42,6 @@ main() { local failure=0 local file= local name= - local print_line_first="yes" - local print_line_last="yes" local source="./" local verbosity=normal local verbose= @@ -119,11 +117,6 @@ main() { p= fi - if [[ ${verbosity} == "quiet" ]] ; then - print_line_first="no" - print_line_last="no" - fi - generate_ctags_handle_colors if [[ ${do_help} == "yes" ]] ; then @@ -142,15 +135,11 @@ main() { if [[ $(echo "$name" | grep -s -o "/") != "" || ${name} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - if [[ ${name} == "" ]] ; then echo -e "${c_error}ERROR: No ${c_notice}name${c_error} parameter has been provided or is empty.${c_reset}" else echo -e "${c_error}ERROR: The ${c_notice}name${c_error} parameter value '${c_notice}${name}${c_error}' must not have a slash.${c_reset}" fi - - generate_ctags_print_last fi generate_ctags_cleanup @@ -160,15 +149,11 @@ main() { if [[ ${destination} == "" || ! -d ${destination} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - if [[ ${destination} == "" ]] ; then echo -e "${c_error}ERROR: The ${c_notice}destination${c_error} parameter is empty.${c_reset}" else echo -e "${c_error}ERROR: The ${c_notice}destination${c_error} parameter value '${c_notice}${destination}${c_error}' must be a directory.${c_reset}" fi - - generate_ctags_print_last fi generate_ctags_cleanup @@ -178,15 +163,11 @@ main() { if [[ ${source} == "" || ! -d ${source} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - if [[ ${source} == "" ]] ; then echo -e "${c_error}ERROR: The ${c_notice}source${c_error} parameter is empty.${c_reset}" else echo -e "${c_error}ERROR: The ${c_notice}source${c_error} parameter value '${c_notice}${source}${c_error}' must be a directory.${c_reset}" fi - - generate_ctags_print_last fi generate_ctags_cleanup @@ -205,11 +186,7 @@ main() { if [[ $? -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - echo -e "${c_error}ERROR: The ${c_notice}ctags${c_error} process failed.${c_reset}" - - generate_ctags_print_last fi generate_ctags_cleanup @@ -227,11 +204,7 @@ main() { if [[ $? -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - echo -e "${c_error}ERROR: Failed to strip the full path from the ${c_notice}${file}${c_error} file.${c_reset}" - - generate_ctags_print_last fi generate_ctags_cleanup @@ -242,11 +215,7 @@ main() { fi if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - echo -e "${c_highlight}SUCCESS: The file ${c_notice}${file}${c_highlight} has been generated.${c_reset}" - - generate_ctags_print_last fi generate_ctags_cleanup @@ -254,22 +223,6 @@ main() { return 0 } -generate_ctags_print_first() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - fi -} - -generate_ctags_print_last() { - - if [[ ${print_line_last} == "yes" ]] ; then - echo - fi -} - generate_ctags_handle_colors() { if [[ ${do_color} == "light" ]] ; then @@ -294,8 +247,6 @@ generate_ctags_handle_colors() { generate_ctags_help() { - generate_ctags_print_first - echo -e "${c_title}${public_name}${c_reset}" echo -e " ${c_notice}Version ${version}${c_reset}" echo @@ -319,21 +270,15 @@ generate_ctags_help() { echo -e " -${c_important}s${c_reset}, --${c_important}source${c_reset} The source directory containing the header files for generating the ctags from." echo echo -e "The ${c_notice}name${c_reset} represents the name of the file, without the extension." - - generate_ctags_print_last } generate_ctags_copyright() { - generate_ctags_print_first - echo "Copyright © 2007-2024 Kevin Day." echo echo "Source code license lgpl-2.1-or-later." echo "Standard and specification license open-standard-license-1.0-or-later." echo "Documentation license cc-by-sa-4.0." - - generate_ctags_print_last } generate_ctags_cleanup() { @@ -342,8 +287,6 @@ generate_ctags_cleanup() { unset generate_ctags_main unset generate_ctags_handle_colors unset generate_ctags_help - unset generate_ctags_print_first - unset generate_ctags_print_last unset generate_ctags_cleanup } diff --git a/build/scripts/install.sh b/build/scripts/install.sh index 327a443..d51f2dc 100644 --- a/build/scripts/install.sh +++ b/build/scripts/install.sh @@ -81,8 +81,6 @@ install_main() { local enable_static_programs="yes" local enable_static_libraries="yes" local enable_includes="yes" - local print_line_first="yes" - local print_line_last="yes" if [[ $# -gt 0 ]] ; then t=$# @@ -223,11 +221,6 @@ install_main() { p= fi - if [[ ${verbosity} == "quiet" ]] ; then - print_line_first="no" - print_line_last="no" - fi - install_handle_colors if [[ ${do_help} == "yes" ]] ; then @@ -246,11 +239,7 @@ install_main() { if [[ ${operation_failure} == "fail-unsupported" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}" - - install_print_last fi install_cleanup @@ -260,11 +249,7 @@ install_main() { if [[ ! -d ${path_build} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The build path ${c_notice}${path_build}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -274,11 +259,7 @@ install_main() { if [[ ${work} == "" && ${destination_prefix} != "" && ! -d ${destination_prefix} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination prefix ${c_notice}${destination_prefix}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -342,11 +323,7 @@ install_main() { if [[ ${work} != "" && ! -d ${work} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The work directory ${c_notice}${work}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -356,11 +333,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_programs} && ! -d ${destination_programs} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination bindir ${c_notice}${destination_programs}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -370,11 +343,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_programs_static} && ! -d ${destination_programs_static} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) bindir ${c_notice}${destination_programs_static}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -384,11 +353,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_programs_shared} && ! -d ${destination_programs_shared} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) bindir ${c_notice}${destination_programs_shared}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -398,11 +363,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_includes} && ! -d ${destination_includes} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination incluedir ${c_notice}${destination_includes}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -412,11 +373,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_libraries_static} && ! -d ${destination_libraries_static} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) libdir ${c_notice}${destination_libraries_static}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -426,11 +383,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_libraries_shared} && ! -d ${destination_libraries_shared} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) libdir ${c_notice}${destination_libraries_shared}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -440,12 +393,6 @@ install_main() { install_perform_install - if [[ ${verbosity} != "quiet" ]] ; then - if [[ ${failure} -eq 1 || ${verbosity} != "error" ]] ; then - install_print_last - fi - fi - install_cleanup if [[ ${failure} -eq 1 ]] ; then @@ -479,8 +426,6 @@ install_handle_colors() { install_help() { - install_print_first - echo -e "${c_title}${public_name}${c_reset}" echo -e " ${c_notice}Version ${version}${c_reset}" echo @@ -528,21 +473,15 @@ install_help() { echo -e " --${c_important}libraries-shared${c_reset} Custom destination for shared libraries." echo -e " --${c_important}programs-static${c_reset} Custom destination for static programs." echo -e " --${c_important}programs-shared${c_reset} Custom destination for shared programs." - - install_print_last } install_copyright() { - install_print_first - echo "Copyright © 2007-2024 Kevin Day." echo echo "Source code license lgpl-2.1-or-later." echo "Standard and specification license open-standard-license-1.0-or-later." echo "Documentation license cc-by-sa-4.0." - - install_print_last } install_perform_install() { @@ -582,8 +521,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_prefix}${c_error}.${c_reset}" fi @@ -597,8 +534,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs}${c_error}.${c_reset}" fi @@ -611,8 +546,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs_shared}${c_error}.${c_reset}" fi @@ -625,8 +558,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs_static}${c_error}.${c_reset}" fi @@ -641,8 +572,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_libraries}${c_error}.${c_reset}" fi @@ -655,8 +584,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_libraries_shared}${c_error}.${c_reset}" fi @@ -669,8 +596,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_libraries_static}${c_error}.${c_reset}" fi @@ -685,8 +610,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_includes}${c_error}.${c_reset}" fi @@ -701,8 +624,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_documentation}${c_error}.${c_reset}" fi @@ -717,8 +638,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_settings}${c_error}.${c_reset}" fi @@ -741,8 +660,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing Includes to: ${c_reset}${c_notice}${destination_includes}${c_reset}${c_highlight}.${c_reset}" fi @@ -750,8 +668,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to copy include files from ${c_notice}${path_build}${path_includes}${c_error} to ${c_notice}${destination_includes}${c_error}.${c_reset}" fi @@ -775,8 +691,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing (${c_notice}static${c_highlight}) Libraries to: ${c_reset}${c_notice}${destination_libraries_static}${c_reset}${c_highlight}.${c_reset}" fi @@ -784,8 +699,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to copy (${c_notice}static${c_error}) library files from ${c_notice}${path_build}${path_libraries}${path_static}${c_error} to ${c_notice}${destination_libraries_static}${c_error}.${c_reset}" fi @@ -808,8 +721,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing (${c_notice}shared${c_highlight}) Libraries to: ${c_reset}${c_notice}${destination_libraries_shared}${c_reset}${c_highlight}.${c_reset}" fi @@ -817,8 +729,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to copy (${c_notice}shared${c_error}) library files from ${c_notice}${path_build}${path_libraries}${path_shared}${c_error} to ${c_notice}${destination_libraries_shared}${c_error}.${c_reset}" fi @@ -843,8 +753,7 @@ install_perform_install() { if [[ ${file} != "" && ${enable_static_programs} == "yes" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing (${c_notice}static${c_highlight}) Programs to: ${c_reset}${c_notice}${destination_programs_static}${c_reset}${c_highlight}.${c_reset}" fi @@ -852,8 +761,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: failed to copy (${c_notice}static${c_error}) program files from ${c_notice}${path_build}${path_programs}${path_static}${c_error} to ${c_notice}${destination_programs_static}${c_error}.${c_reset}" fi @@ -876,8 +783,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing (${c_notice}shared${c_highlight}) Programs to: ${c_reset}${c_notice}${destination_programs_shared}${c_reset}${c_highlight}.${c_reset}" fi @@ -885,8 +791,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: failed to copy (${c_notice}shared${c_error}) program files from ${c_notice}${path_build}${path_programs}${path_shared}${c_error} to ${c_notice}${destination_programs_shared}${c_error}.${c_reset}" fi @@ -910,8 +814,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing Settings to: ${c_reset}${c_notice}${destination_settings}${c_reset}${c_highlight}.${c_reset}" fi @@ -919,8 +822,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: failed to copy settings files from ${c_notice}${path_build}${path_settings}${c_error} to ${c_notice}${destination_settings}${c_error}.${c_reset}" fi @@ -943,8 +844,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing Documentation to: ${c_reset}${c_notice}${destination_documentation}${c_reset}${c_highlight}.${c_reset}" fi @@ -952,8 +852,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: failed to copy documentation files from ${c_notice}${path_build}${path_documentation}${c_error} to ${c_notice}${destination_documentation}${c_error}.${c_reset}" fi @@ -969,35 +867,6 @@ install_perform_install() { return 0 } -install_print_first() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - fi -} - -install_print_first_or_always() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - elif [[ ${print_line_first} == "no" ]] ; then - print_line_first= - else - echo - fi -} - -install_print_last() { - - if [[ ${print_line_last} == "yes" ]] ; then - echo - fi -} - install_cleanup() { unset install_copyright @@ -1005,9 +874,6 @@ install_cleanup() { unset install_handle_colors unset install_help unset install_perform_install - unset install_print_first - unset install_print_first_or_always - unset install_print_last unset install_cleanup } diff --git a/build/scripts/package.sh b/build/scripts/package.sh index a8d5871..d5e5f2f 100644 --- a/build/scripts/package.sh +++ b/build/scripts/package.sh @@ -53,8 +53,6 @@ package_main() { local path_destination=package/ local path_sources=./ local prepend= - local print_line_first="yes" - local print_line_last="yes" local verbosity=normal local verbose= local verbose_common= @@ -155,11 +153,6 @@ package_main() { p= fi - if [[ ${verbosity} == "quiet" ]] ; then - print_line_first="no" - print_line_last="no" - fi - package_handle_colors if [[ ${do_help} == "yes" ]] ; then @@ -178,11 +171,7 @@ package_main() { if [[ ${operation_failure} == "fail-multiple" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Only one operation may be specified at a time.${c_reset}" - - package_print_last fi package_cleanup @@ -201,11 +190,7 @@ package_main() { if [[ ! -f build/stand_alone/${i}.settings ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Unknown or unsupported stand alone program '${c_notice}${i}${c_error}'.${c_reset}" - - package_print_last fi package_cleanup @@ -227,11 +212,7 @@ package_main() { if [[ ${operation} == "build" || ${operation} == "rebuild" ]] ; then if [[ ! -d ${path_build} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Build directory '${c_notice}${path_build}${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -244,11 +225,7 @@ package_main() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Package directory '${c_notice}${path_destination}${c_error}' is invalid or could not be created.${c_reset}" - - package_print_last fi package_cleanup @@ -259,11 +236,7 @@ package_main() { if [[ ! -d ${path_sources} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Sources directory '${c_notice}${path_sources}${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -273,11 +246,7 @@ package_main() { if [[ ! -d ${path_sources}level_0/ ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_0/${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -287,11 +256,7 @@ package_main() { if [[ ! -d ${path_sources}level_1/ ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_1/${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -301,11 +266,7 @@ package_main() { if [[ ! -d ${path_sources}level_2/ ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_2/${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -315,11 +276,7 @@ package_main() { if [[ ! -d ${path_sources}level_3/ ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_3/${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -381,11 +338,7 @@ package_main() { elif [[ ${operation} == "dependencies" ]] ; then if [[ ! -d ${path_sources} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Sources directory '${c_notice}${path_sources}${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -397,11 +350,7 @@ package_main() { elif [[ ${operation} == "clean" ]] ; then if [[ ! -d ${path_destination} ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - package_print_first - echo -e "${c_warning}WARNING: Package directory '${c_notice}${path_destination}${c_error}' does not exist, there is nothing to clean.${c_reset}" - - package_print_last fi package_cleanup @@ -412,11 +361,7 @@ package_main() { package_operation_clean elif [[ ${operation} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: No operation was given.${c_reset}" - - package_print_last fi package_cleanup @@ -424,11 +369,7 @@ package_main() { return 1 else if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}" - - package_print_last fi package_cleanup @@ -436,12 +377,6 @@ package_main() { return 1 fi - if [[ ${verbosity} != "quiet" ]] ; then - if [[ ${failure} -eq 1 || ${verbosity} != "error" ]] ; then - package_print_last - fi - fi - package_cleanup if [[ ${failure} -eq 1 ]] ; then @@ -475,8 +410,6 @@ package_handle_colors() { package_help() { - package_print_first - echo -e "${c_title}${public_name}${c_reset}" echo -e " ${c_notice}Version ${version}${c_reset}" echo @@ -509,20 +442,15 @@ package_help() { echo -e " -${c_important}p${c_reset}, --${c_important}program${c_reset} Build program packages (level 3)." echo -e " -${c_important}s${c_reset}, --${c_important}sources${c_reset} Specify a custom sources directory." echo -e " -${c_important}S${c_reset}, --${c_important}stand_alone${c_reset} Build a specified program package as stand alone." - echo } package_copyright() { - package_print_first - echo "Copyright © 2007-2024 Kevin Day." echo echo "Source code license lgpl-2.1-or-later." echo "Standard and specification license open-standard-license-1.0-or-later." echo "Documentation license cc-by-sa-4.0." - - package_print_last } package_create_base_files() { @@ -532,8 +460,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}${c_error}.${c_reset}" fi @@ -546,8 +472,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${path_build}documents${c_error} to ${c_notice}${package}${c_error}.${c_reset}" fi @@ -561,8 +485,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${path_build}licenses${c_error} to ${c_notice}${package}${c_error}.${c_reset}" fi @@ -573,8 +495,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${path_build}../licenses${c_error} to ${c_notice}${package}${c_error}.${c_reset}" fi @@ -582,8 +502,6 @@ package_create_base_files() { fi else if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Neither directory ${c_notice}${path_build}licenses${c_error} nor ${c_notice}${path_build}../licenses${c_error} can be found or are invalid.${c_reset}" fi @@ -596,8 +514,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to copy script ${c_notice}${path_build}bootstrap.sh${c_error} to ${c_notice}${package}${c_error}.${c_reset}" fi @@ -609,8 +525,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to set executable permissions on script ${c_notice}${package}bootstrap.sh${c_error}.${c_reset}" fi @@ -623,8 +537,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to copy script ${c_notice}${path_build}install.sh${c_error} to ${c_notice}${package}${c_error}.${c_reset}" fi @@ -637,8 +549,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to set executable permissions on script ${c_notice}${package}install.sh${c_error}.${c_reset}" fi @@ -685,15 +595,12 @@ package_dependencies_individual() { level_current="$(echo ${directory} | grep -o '\") == "" ]] ; then if [[ ${verbosity} == "verbose" || ${verbosity} == "debug" ]] ; then - test_print_first_or_always - echo -e "${c_warning}WARNING: Project '${c_notice}${project}${c_warning}' does not have a testfile.${c_reset}" fi else - test_print_first_or_always - echo -e "Project '${c_notice}${project}${c_reset}' has no tests and is not expected to.${c_reset}" fi @@ -1175,8 +1041,6 @@ test_operate_tests_programs() { if [[ ${failure} -eq 0 ]] ; then if [[ ! -f ${path_test_package_program}${program}-${version}/data/build/testfile ]] ; then if [[ ${verbosity} == "verbose" || ${verbosity} == "debug" ]] ; then - test_print_first_or_always - echo -e "${c_warning}WARNING: Program '${c_notice}${program}${c_warning}' does not have a testfile.${c_reset}" fi @@ -1208,8 +1072,6 @@ test_operate_tests_run() { if [[ ${failure} -eq 0 ]] ; then if [[ ${verbosity} == "debug" ]] ; then - test_print_first_or_always - if [[ ${build_compiler} == "gcc" ]] ; then echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test ${analyze_flag} ${analyze_value} clean make -f testfile ${ci_arguments}" else @@ -1225,11 +1087,7 @@ test_operate_tests_run() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - test_print_first - echo -e "${c_error}ERROR: Failure while testing ${what} '${c_notice}${name}${c_reset}${c_error}'.${c_reset}" - - test_print_last fi let failure=1 @@ -1237,35 +1095,6 @@ test_operate_tests_run() { fi } -test_print_first() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - fi -} - -test_print_first_or_always() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - elif [[ ${print_line_first} == "no" ]] ; then - print_line_first= - else - echo - fi -} - -test_print_last() { - - if [[ ${print_line_last} == "yes" ]] ; then - echo - fi -} - test_cleanup() { unset test_copyright @@ -1287,9 +1116,6 @@ test_cleanup() { unset test_operate_tests_projects unset test_operate_tests_programs unset test_operate_tests_run - unset test_print_first - unset test_print_first_or_always - unset test_print_last unset test_cleanup }