]> Kevux Git Server - fll/commitdiff
Cleanup: Make scripts more consistent with their arguments.
authorKevin Day <thekevinday@gmail.com>
Tue, 1 Mar 2022 05:07:06 +0000 (23:07 -0600)
committerKevin Day <thekevinday@gmail.com>
Tue, 1 Mar 2022 05:07:06 +0000 (23:07 -0600)
build/scripts/bootstrap.sh
build/scripts/install.sh
build/scripts/package.sh

index cd8d32fc4eed59ee9c80714ea3adabd09d5547b3..689db5cf2167dea24aacb56ea8c3517a1d66b5f2 100644 (file)
@@ -15,7 +15,7 @@ bootstrap_main() {
   local version=0.5.9
 
   local grab_next=
-  local do_color=normal
+  local do_color=dark
   local do_help=
   local i=0
   local m=
@@ -59,6 +59,8 @@ bootstrap_main() {
   local defines_override=
   local process=
   local verbosity=normal
+  local verbose=
+  local verbose_common=
 
   local enable_shared=
   local enable_static=
@@ -73,19 +75,34 @@ bootstrap_main() {
       if [[ $grab_next == "" ]] ; then
         if [[ $p == "-h" || $p == "--help" ]] ; then
           do_help=yes
-        elif [[ $p == "+n" || $p == "++no_color" ]] ; then
-          do_color=none
+        elif [[ $p == "+d" || $p == "++dark" ]] ; then
+          do_color=dark
+          context="+d"
         elif [[ $p == "+l" || $p == "++light" ]] ; then
           do_color=light
+          context="+l"
+        elif [[ $p == "+n" || $p == "++no_color" ]] ; then
+          do_color=none
+          context="+n"
         elif [[ $p == "+q" || $p == "++quiet" ]] ; then
           verbosity="quiet"
           verbose=
+          verbose_common=
+        elif [[ $p == "+N" || $p == "++normal" ]] ; then
+          verbosity=
+          verbose=
+          verbose_common=
+        elif [[ $p == "+V" || $p == "++verbose" ]] ; then
+          verbosity="verbose"
+          verbose="+V"
+          verbose_common="-v"
+        elif [[ $p == "+D" || $p == "++debug" ]] ; then
+          verbosity="debug"
+          verbose="+D"
+          verbose_common="-v"
         elif [[ $p == "+v" || $p == "++version" ]] ; then
           echo $version
           return
-        elif [[ $p == "+V" || $p == "++verbose" ]] ; then
-          verbosity="verbose"
-          verbose="-v"
         elif [[ $p == "-d" || $p == "--defines" ]] ; then
           grab_next=defines_override
         elif [[ $p == "-m" || $p == "--mode" ]] ; then
@@ -432,10 +449,13 @@ bootstrap_help() {
   echo
   echo -e "${c_highlight}Options:$c_reset"
   echo -e " -${c_important}h$c_reset, --${c_important}help$c_reset      Print this help screen."
+  echo -e " +${c_important}d$c_reset, ++${c_important}dark$c_reset      Use color modes that show up better on dark backgrounds."
   echo -e " +${c_important}l$c_reset, ++${c_important}light$c_reset     Use color modes that show up better on light backgrounds."
   echo -e " +${c_important}n$c_reset, ++${c_important}no_color$c_reset  Do not use color."
-  echo -e " +${c_important}q$c_reset, ++${c_important}quiet$c_reset     Decrease verbosity beyond normal output."
+  echo -e " +${c_important}q$c_reset, ++${c_important}quiet$c_reset     Decrease verbosity, silencing most output."
+  echo -e " +${c_important}N$c_reset, ++${c_important}normal$c_reset    Set verbosity to normal."
   echo -e " +${c_important}V$c_reset, ++${c_important}verbose$c_reset   Increase verbosity beyond normal output."
+  echo -e " +${c_important}D$c_reset, ++${c_important}debug$c_reset     Enable debugging, significantly increasing verbosity beyond normal output."
   echo -e " +${c_important}v$c_reset, ++${c_important}version$c_reset   Print the version number of this program."
   echo
   echo -e "${c_highlight}Bootstrap Options:$c_reset"
index f64033fb8808d41d128acfd35bf75a7ee0af0c0d..0f56564f1d18cce6d0fa5a12a6b833d9ee7dd8f3 100644 (file)
@@ -15,7 +15,7 @@ install_main() {
   local version=0.5.9
 
   local grab_next=
-  local do_color=normal
+  local do_color=dark
   local do_help=
   local i=0
   local p=
@@ -37,6 +37,7 @@ install_main() {
   local operation_failure=
   local verbosity=normal
   local verbose=
+  local verbose_common=
 
   local path_build=build/
   local path_programs=programs/
@@ -75,19 +76,34 @@ install_main() {
       if [[ $grab_next == "" ]] ; then
         if [[ $p == "-h" || $p == "--help" ]] ; then
           do_help=yes
-        elif [[ $p == "+n" || $p == "++no_color" ]] ; then
-          do_color=none
+        elif [[ $p == "+d" || $p == "++dark" ]] ; then
+          do_color=dark
+          context="+d"
         elif [[ $p == "+l" || $p == "++light" ]] ; then
           do_color=light
+          context="+l"
+        elif [[ $p == "+n" || $p == "++no_color" ]] ; then
+          do_color=none
+          context="+n"
         elif [[ $p == "+q" || $p == "++quiet" ]] ; then
           verbosity="quiet"
           verbose=
+          verbose_common=
+        elif [[ $p == "+N" || $p == "++normal" ]] ; then
+          verbosity=
+          verbose=
+          verbose_common=
+        elif [[ $p == "+V" || $p == "++verbose" ]] ; then
+          verbosity="verbose"
+          verbose="+V"
+          verbose_common="-v"
+        elif [[ $p == "+D" || $p == "++debug" ]] ; then
+          verbosity="debug"
+          verbose="+D"
+          verbose_common="-v"
         elif [[ $p == "+v" || $p == "++version" ]] ; then
           echo $version
           return
-        elif [[ $p == "+V" || $p == "++verbose" ]] ; then
-          verbosity="verbose"
-          verbose="-v"
         elif [[ $p == "-b" || $p == "--build" ]] ; then
           grab_next=path_build
         elif [[ $p == "-s" || $p == "--settings" ]] ; then
@@ -360,10 +376,13 @@ install_help() {
   echo
   echo -e "${c_highlight}Options:$c_reset"
   echo -e " -${c_important}h$c_reset, --${c_important}help$c_reset      Print this help screen."
+  echo -e " +${c_important}d$c_reset, ++${c_important}dark$c_reset      Use color modes that show up better on dark backgrounds."
   echo -e " +${c_important}l$c_reset, ++${c_important}light$c_reset     Use color modes that show up better on light backgrounds."
   echo -e " +${c_important}n$c_reset, ++${c_important}no_color$c_reset  Do not use color."
-  echo -e " +${c_important}q$c_reset, ++${c_important}quiet$c_reset     Decrease verbosity beyond normal output."
+  echo -e " +${c_important}q$c_reset, ++${c_important}quiet$c_reset     Decrease verbosity, silencing most output."
+  echo -e " +${c_important}N$c_reset, ++${c_important}normal$c_reset    Set verbosity to normal."
   echo -e " +${c_important}V$c_reset, ++${c_important}verbose$c_reset   Increase verbosity beyond normal output."
+  echo -e " +${c_important}D$c_reset, ++${c_important}debug$c_reset     Enable debugging, significantly increasing verbosity beyond normal output."
   echo -e " +${c_important}v$c_reset, ++${c_important}version$c_reset   Print the version number of this program."
   echo
   echo -e "${c_highlight}Install Options:$c_reset"
@@ -542,7 +561,7 @@ install_perform_install() {
   if [[ $work != "" ]] ; then
     if [[ $build_sources_program != "" && ( $enable_shared_programs == "yes" || $enable_static_programs == "yes" ) ]] ; then
       if [[ ! -d ${work}programs ]] ; then
-        mkdir $verbose ${work}programs
+        mkdir $verbose_common ${work}programs
 
         if [[ $? -ne 0 ]] ; then
           if [[ $verbosity != "quiet" ]] ; then
@@ -554,7 +573,7 @@ install_perform_install() {
       fi
 
       if [[ $enable_shared_programs == "yes" && ! -d ${work}programs/shared ]] ; then
-        mkdir $verbose ${work}programs/shared
+        mkdir $verbose_common ${work}programs/shared
 
         if [[ $? -ne 0 ]] ; then
           if [[ $verbosity != "quiet" ]] ; then
@@ -566,7 +585,7 @@ install_perform_install() {
       fi
 
       if [[ $build_sources_program != "" && $enable_static_programs == "yes" && ! -d ${work}programs/static ]] ; then
-        mkdir $verbose ${work}programs/static
+        mkdir $verbose_common ${work}programs/static
 
         if [[ $? -ne 0 ]] ; then
           if [[ $verbosity != "quiet" ]] ; then
@@ -580,7 +599,7 @@ install_perform_install() {
 
     if [[ $build_sources_library != "" && ( $enable_shared_libraries == "yes" || $enable_static_libraries == "yes" ) ]] ; then
       if [[ ! -d ${work}libraries ]] ; then
-        mkdir $verbose ${work}libraries
+        mkdir $verbose_common ${work}libraries
 
         if [[ $? -ne 0 ]] ; then
           if [[ $verbosity != "quiet" ]] ; then
@@ -592,7 +611,7 @@ install_perform_install() {
       fi
 
       if [[ $build_sources_library != "" && $enable_shared_libraries == "yes" && ! -d ${work}libraries/shared ]] ; then
-        mkdir $verbose ${work}libraries/shared
+        mkdir $verbose_common ${work}libraries/shared
 
         if [[ $? -ne 0 ]] ; then
           if [[ $verbosity != "quiet" ]] ; then
@@ -604,7 +623,7 @@ install_perform_install() {
       fi
 
       if [[ $build_sources_library != "" && $enable_static_libraries == "yes" && ! -d ${work}libraries/static ]] ; then
-        mkdir $verbose ${work}libraries/static
+        mkdir $verbose_common ${work}libraries/static
 
         if [[ $? -ne 0 ]] ; then
           if [[ $verbosity != "quiet" ]] ; then
@@ -618,7 +637,7 @@ install_perform_install() {
 
     if [[ $build_sources_headers != "" && $enable_includes == "yes" ]] ; then
       if [[ ! -d ${work}includes ]] ; then
-        mkdir $verbose ${work}includes
+        mkdir $verbose_common ${work}includes
 
         if [[ $? -ne 0 ]] ; then
           if [[ $verbosity != "quiet" ]] ; then
@@ -648,7 +667,7 @@ install_perform_install() {
       echo -e "${c_highlight}Installing Includes to: $c_reset$c_notice$destination_includes$c_reset${c_highlight}.$c_reset"
     fi
 
-    cp $verbose -R $path_build${path_includes}* $destination_includes
+    cp $verbose_common -R $path_build${path_includes}* $destination_includes
 
     if [[ $? -ne 0 ]] ; then
       if [[ $verbosity != "quiet" ]] ; then
@@ -666,7 +685,7 @@ install_perform_install() {
         echo -e "${c_highlight}Installing (static) Libraries to: $c_reset$c_notice$destination_libraries_static$c_reset${c_highlight}.$c_reset"
       fi
 
-      cp $verbose -R $path_build$path_libraries${path_static}* $destination_libraries_static
+      cp $verbose_common -R $path_build$path_libraries${path_static}* $destination_libraries_static
 
       if [[ $? -ne 0 ]] ; then
         if [[ $verbosity != "quiet" ]] ; then
@@ -683,7 +702,7 @@ install_perform_install() {
         echo -e "${c_highlight}Installing (shared) Libraries to: $c_reset$c_notice$destination_libraries_shared$c_reset${c_highlight}.$c_reset"
       fi
 
-      cp $verbose -R $path_build$path_libraries${path_shared}* $destination_libraries_shared
+      cp $verbose_common -R $path_build$path_libraries${path_shared}* $destination_libraries_shared
 
       if [[ $? -ne 0 ]] ; then
         if [[ $verbosity != "quiet" ]] ; then
@@ -702,7 +721,7 @@ install_perform_install() {
         echo -e "${c_highlight}Installing (static) Programs to: $c_reset$c_notice$destination_programs_static$c_reset${c_highlight}.$c_reset"
       fi
 
-      cp $verbose -R $path_build$path_programs${path_static}* $destination_programs_static
+      cp $verbose_common -R $path_build$path_programs${path_static}* $destination_programs_static
 
       if [[ $? -ne 0 ]] ; then
         if [[ $verbosity != "quiet" ]] ; then
@@ -719,7 +738,7 @@ install_perform_install() {
         echo -e "${c_highlight}Installing (shared) Programs to: $c_reset$c_notice$destination_programs_shared$c_reset${c_highlight}.$c_reset"
       fi
 
-      cp $verbose -R $path_build$path_programs${path_shared}* $destination_programs_shared
+      cp $verbose_common -R $path_build$path_programs${path_shared}* $destination_programs_shared
 
       if [[ $? -ne 0 ]] ; then
         if [[ $verbosity != "quiet" ]] ; then
index 085cfd98e60d79c147c7696bbdddd06bfa2adc26..44355eeea42254bc4ac435a21bd62e619e92bb7b 100644 (file)
@@ -13,7 +13,7 @@ package_main() {
   local version=0.5.9
 
   local grab_next=
-  local do_color=normal
+  local do_color=dark
   local do_help=
   local i=0
   local p=
@@ -40,6 +40,8 @@ package_main() {
   local path_destination=package/
   local path_sources=./
   local verbosity=normal
+  local verbose=
+  local verbose_common=
 
   if [[ $# -gt 0 ]] ; then
     t=$#
@@ -51,19 +53,34 @@ package_main() {
       if [[ $grab_next == "" ]] ; then
         if [[ $p == "-h" || $p == "--help" ]] ; then
           do_help=yes
-        elif [[ $p == "+n" || $p == "++no_color" ]] ; then
-          do_color=none
+        elif [[ $p == "+d" || $p == "++dark" ]] ; then
+          do_color=dark
+          context="+d"
         elif [[ $p == "+l" || $p == "++light" ]] ; then
           do_color=light
+          context="+l"
+        elif [[ $p == "+n" || $p == "++no_color" ]] ; then
+          do_color=none
+          context="+n"
         elif [[ $p == "+q" || $p == "++quiet" ]] ; then
           verbosity="quiet"
           verbose=
+          verbose_common=
+        elif [[ $p == "+N" || $p == "++normal" ]] ; then
+          verbosity=
+          verbose=
+          verbose_common=
+        elif [[ $p == "+V" || $p == "++verbose" ]] ; then
+          verbosity="verbose"
+          verbose="+V"
+          verbose_common="-v"
+        elif [[ $p == "+D" || $p == "++debug" ]] ; then
+          verbosity="debug"
+          verbose="+D"
+          verbose_common="-v"
         elif [[ $p == "+v" || $p == "++version" ]] ; then
           echo $version
           return
-        elif [[ $p == "+V" || $p == "++verbose" ]] ; then
-          verbosity="verbose"
-          verbose="-v"
         elif [[ $p == "-b" || $p == "--build" ]] ; then
           grab_next=path_build
         elif [[ $p == "-d" || $p == "--destination" ]] ; then
@@ -289,10 +306,13 @@ package_help() {
   echo
   echo -e "${c_highlight}Options:$c_reset"
   echo -e " -${c_important}h$c_reset, --${c_important}help$c_reset      Print this help screen."
+  echo -e " +${c_important}d$c_reset, ++${c_important}dark$c_reset      Use color modes that show up better on dark backgrounds."
   echo -e " +${c_important}l$c_reset, ++${c_important}light$c_reset     Use color modes that show up better on light backgrounds."
   echo -e " +${c_important}n$c_reset, ++${c_important}no_color$c_reset  Do not use color."
-  echo -e " +${c_important}q$c_reset, ++${c_important}quiet$c_reset     Decrease verbosity beyond normal output."
+  echo -e " +${c_important}q$c_reset, ++${c_important}quiet$c_reset     Decrease verbosity, silencing most output."
+  echo -e " +${c_important}N$c_reset, ++${c_important}normal$c_reset    Set verbosity to normal."
   echo -e " +${c_important}V$c_reset, ++${c_important}verbose$c_reset   Increase verbosity beyond normal output."
+  echo -e " +${c_important}D$c_reset, ++${c_important}debug$c_reset     Enable debugging, significantly increasing verbosity beyond normal output."
   echo -e " +${c_important}v$c_reset, ++${c_important}version$c_reset   Print the version number of this program."
   echo
   echo -e "${c_highlight}Package Options:$c_reset"