From 5ac9f0774471d0595a205b1a591c3dd879df733a Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 11 Jun 2020 21:46:49 -0500 Subject: [PATCH] Update: Improve verbiage in package.sh and output current project being built in bootstrap.sh The package.sh script should instead say "Packaging Project". The bootstrap.sh script should output that it is building or cleaning a project and display the current project name and version if available. --- build/scripts/bootstrap.sh | 25 +++++++++++++++++++++++++ build/scripts/package.sh | 8 ++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/build/scripts/bootstrap.sh b/build/scripts/bootstrap.sh index c7aaf68..285f6b5 100644 --- a/build/scripts/bootstrap.sh +++ b/build/scripts/bootstrap.sh @@ -46,6 +46,7 @@ bootstrap_main() { local path_c=sources/c/ local path_work= local project_built= + local project_label= local defines_override= local process= local verbosity="normal" @@ -277,6 +278,20 @@ bootstrap_main() { return 1 fi + project_label="${variables[$(bootstrap_id project_name)]}" + + if [[ "${variables[$(bootstrap_id version_major)]}" != "" ]] ; then + project_label="${project_label}-${variables[$(bootstrap_id version_major)]}" + + if [[ "${variables[$(bootstrap_id version_minor)]}" != "" ]] ; then + project_label="${project_label}.${variables[$(bootstrap_id version_minor)]}" + + if [[ "${variables[$(bootstrap_id version_micro)]}" != "" ]] ; then + project_label="${project_label}.${variables[$(bootstrap_id version_micro)]}" + fi + fi + fi + if [[ $operation_failure == "fail-multiple" ]] ; then if [[ $verbosity != "quiet" ]] ; then echo -e "${c_error}ERROR: only one operation may be specified at a time.$c_reset" @@ -285,6 +300,11 @@ bootstrap_main() { bootstrap_cleanup return 1 elif [[ $operation == "build" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo + echo -e "${c_highlight}Building Project:${c_reset} $c_notice$project_label${c_highlight}.$c_reset" + fi + if [[ -f ${project_built}.built ]] ; then if [[ $verbosity != "quiet" ]] ; then echo -e "${c_warning}WARNING: this project has already been built.$c_reset" @@ -297,6 +317,11 @@ bootstrap_main() { bootstrap_operation_build fi elif [[ $operation == "clean" ]] ; then + if [[ $verbosity != "quiet" ]] ; then + echo + 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 diff --git a/build/scripts/package.sh b/build/scripts/package.sh index 873649d..8cec648 100644 --- a/build/scripts/package.sh +++ b/build/scripts/package.sh @@ -1055,7 +1055,7 @@ package_operation_individual() { if [[ $verbosity != "quiet" ]] ; then echo - echo -e "${c_highlight}Processing Package$c_reset (individual) $c_notice${name}-${version}$c_reset${c_highlight}.$c_reset" + echo -e "${c_highlight}Packaging Project$c_reset (individual) $c_notice${name}-${version}$c_reset${c_highlight}.$c_reset" fi package_create_base_files @@ -1093,7 +1093,7 @@ package_operation_level() { if [[ $verbosity != "quiet" ]] ; then echo - echo -e "${c_highlight}Processing Package$c_reset (level) $c_notice${name}-${version}$c_reset${c_highlight}.$c_reset" + echo -e "${c_highlight}Packaging Project$c_reset (level) $c_notice${name}-${version}$c_reset${c_highlight}.$c_reset" fi if [[ ! -d $path_build$level ]] ; then @@ -1199,7 +1199,7 @@ package_operation_monolithic() { if [[ $verbosity != "quiet" ]] ; then echo - echo -e "${c_highlight}Processing Package$c_reset (monolithic) $c_notice${name}-${version}$c_reset${c_highlight}.$c_reset" + echo -e "${c_highlight}Packaging Project$c_reset (monolithic) $c_notice${name}-${version}$c_reset${c_highlight}.$c_reset" fi if [[ ! -d ${path_build}monolithic ]] ; then @@ -1419,7 +1419,7 @@ package_operation_program() { if [[ $verbosity != "quiet" ]] ; then echo - echo -e "${c_highlight}Processing Package$c_reset (program) $c_notice${name}-${version}$c_reset${c_highlight}.$c_reset" + echo -e "${c_highlight}Packaging Project$c_reset (program) $c_notice${name}-${version}$c_reset${c_highlight}.$c_reset" fi package_create_base_files -- 1.8.3.1