]> Kevux Git Server - fll/commitdiff
Update: Improve verbiage in package.sh and output current project being built in...
authorKevin Day <thekevinday@gmail.com>
Fri, 12 Jun 2020 02:46:49 +0000 (21:46 -0500)
committerKevin Day <thekevinday@gmail.com>
Fri, 12 Jun 2020 02:46:49 +0000 (21:46 -0500)
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
build/scripts/package.sh

index c7aaf68219103b157ced667f6c43ac74ba4812f7..285f6b57a501559cc3cfb6037bf25d0ec056d568 100644 (file)
@@ -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
index 873649dd5cd39b5236119054e126ef868b4b7652..8cec64833dbf721adbfc0faa42dbaa24e5958a95 100644 (file)
@@ -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