The primary focus is on fixing the uppercase letters for the error and warning statements to follow proper sentence structure.
Other clean ups are incidental.
local path_build=build/
local path_build_stage=build/stage/
local path_data=data/
- local path_settings="${path_data}settings/"
+ local path_settings=${path_data}settings/
local path_sources=sources/
local path_language=c/
local path_work=
local override_path_work=
local defines_override=
local process=
- local verbosity="normal"
+ local verbosity=normal
local enable_shared=
local enable_static=
if [[ $do_help == "yes" ]] ; then
bootstrap_help
bootstrap_cleanup
+
return 0
fi
fi
bootstrap_cleanup
+
return 1
fi
done
if [[ $? -ne 0 ]] ; then
bootstrap_cleanup
+
return 1
fi
if [[ $? -ne 0 ]] ; then
bootstrap_cleanup
+
return 1
fi
if [[ $? -ne 0 ]] ; then
bootstrap_cleanup
+
return 1
fi
fi
bootstrap_cleanup
+
return 1
fi
else
let i=0
for m in $modes_available ; do
+
for mode in $modes ; do
+
if [[ "$mode" == "$m" ]] ; then
let i=1
+
break
fi
done
fi
bootstrap_cleanup
+
return 1
fi
fi
fi
bootstrap_cleanup
+
return 1
fi
fi
bootstrap_cleanup
+
return 1
fi
fi
bootstrap_cleanup
+
return 1
fi
fi
bootstrap_cleanup
+
return 1
fi
fi
bootstrap_cleanup
+
return 1
fi
fi
bootstrap_cleanup
+
return 1
fi
fi
bootstrap_cleanup
+
return 1
fi
fi
bootstrap_cleanup
+
return 1
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"
+ echo -e "${c_error}ERROR: Only one operation may be specified at a time.$c_reset"
fi
bootstrap_cleanup
+
return 1
elif [[ $operation == "build" ]] ; then
if [[ $verbosity != "quiet" ]] ; then
if [[ $? -ne 0 ]] ; then
bootstrap_cleanup
+
return 1
fi
fi
if [[ $? -ne 0 ]] ; then
bootstrap_cleanup
+
return 1
fi
elif [[ $operation == "clean" ]] ; then
bootstrap_operation_clean
elif [[ $operation == "" ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: no operation was given.$c_reset"
+ echo -e "${c_error}ERROR: No operation was given.$c_reset"
fi
bootstrap_cleanup
+
return 1
else
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the operation $c_notice$operation$c_error was not recognized.$c_reset"
+ echo -e "${c_error}ERROR: The operation $c_notice$operation$c_error was not recognized.$c_reset"
fi
bootstrap_cleanup
+
return 1
fi
bootstrap_cleanup
+
return 0
}
echo -e "${c_title}$public_name$c_reset"
echo -e " ${c_notice}Version $version$c_reset"
echo
- echo -e "$c_highlight$system_name$c_reset $c_notice<${c_reset}operation$c_notice>$c_reset"
+ echo -e "$c_highlight$system_name$c_reset $c_notice[${c_reset} options $c_notice]$c_reset $c_notice[${c_reset} operation $c_notice]$c_reset"
echo -e " ${c_important}build${c_reset} Build or compile the code based on build settings file."
echo -e " ${c_important}clean${c_reset} Delete all build files."
echo
if [[ ! -d ${path_data}build/ ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- 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"
+ 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
- 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"
+ 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
let failure=1
if [[ $failure -eq 1 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: failed to build.$c_reset"
+ echo -e "${c_error}ERROR: Failed to build.$c_reset"
fi
return 1
local settings_file=data/build/settings
local operation=
local operation_failure=
- local verbosity="normal"
+ local verbosity=normal
local verbose=
local path_build=build/
local enable_static=
local enable_static_programs=
local enable_static_libraries=
- local enable_includes="yes"
+ local enable_includes=yes
if [[ $# -gt 0 ]] ; then
t=$#
if [[ $do_help == "yes" ]] ; then
install_help
install_cleanup
+
return 0
fi
if [[ $operation_failure == "fail-unsupported" ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the operation $c_notice$operation$c_error was not recognized.$c_reset"
+ echo -e "${c_error}ERROR: The operation $c_notice$operation$c_error was not recognized.$c_reset"
fi
install_cleanup
+
return 1
fi
if [[ ! -d $path_build ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the build path $c_notice$path_build$c_error is not a valid directory.$c_reset"
+ echo -e "${c_error}ERROR: The build path $c_notice$path_build$c_error is not a valid directory.$c_reset"
fi
install_cleanup
+
return 1
fi
if [[ $work == "" && $destination_prefix != "" && ! -d $destination_prefix ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the destination prefix $c_notice$destination_prefix$c_error is not a valid directory.$c_reset"
+ echo -e "${c_error}ERROR: The destination prefix $c_notice$destination_prefix$c_error is not a valid directory.$c_reset"
fi
install_cleanup
+
return 1
fi
if [[ $work != "" && ! -d $work ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the work directory $c_notice$work$c_error is not a valid directory.$c_reset"
+ echo -e "${c_error}ERROR: The work directory $c_notice$work$c_error is not a valid directory.$c_reset"
fi
install_cleanup
+
return 1
fi
if [[ $work == "" && ! -d $destination_programs ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the destination bindir $c_notice$destination_programs$c_error is not a valid directory.$c_reset"
+ echo -e "${c_error}ERROR: The destination bindir $c_notice$destination_programs$c_error is not a valid directory.$c_reset"
fi
install_cleanup
+
return 1
fi
if [[ $work == "" && ! -d $destination_programs_static ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the destination (static) bindir $c_notice$destination_programs_static$c_error is not a valid directory.$c_reset"
+ echo -e "${c_error}ERROR: The destination (static) bindir $c_notice$destination_programs_static$c_error is not a valid directory.$c_reset"
fi
install_cleanup
+
return 1
fi
if [[ $work == "" && ! -d $destination_programs_shared ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the destination (shared) bindir $c_notice$destination_programs_shared$c_error is not a valid directory.$c_reset"
+ echo -e "${c_error}ERROR: The destination (shared) bindir $c_notice$destination_programs_shared$c_error is not a valid directory.$c_reset"
fi
install_cleanup
+
return 1
fi
if [[ $work == "" && ! -d $destination_includes ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the destination incluedir $c_notice$destination_includes$c_error is not a valid directory.$c_reset"
+ echo -e "${c_error}ERROR: The destination incluedir $c_notice$destination_includes$c_error is not a valid directory.$c_reset"
fi
install_cleanup
+
return 1
fi
if [[ $work == "" && ! -d $destination_libraries_static ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the destination (static) libdir $c_notice$destination_libraries_static$c_error is not a valid directory.$c_reset"
+ echo -e "${c_error}ERROR: The destination (static) libdir $c_notice$destination_libraries_static$c_error is not a valid directory.$c_reset"
fi
install_cleanup
+
return 1
fi
if [[ $work == "" && ! -d $destination_libraries_shared ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the destination (shared) libdir $c_notice$destination_libraries_shared$c_error is not a valid directory.$c_reset"
+ echo -e "${c_error}ERROR: The destination (shared) libdir $c_notice$destination_libraries_shared$c_error is not a valid directory.$c_reset"
fi
install_cleanup
+
return 1
fi
install_perform_install
install_cleanup
+
return 0
}
echo -e "${c_title}$public_name$c_reset"
echo -e " ${c_notice}Version $version$c_reset"
echo
- echo -e "$c_highlight$system_name$c_reset"
+ echo -e "$c_highlight$system_name$c_reset $c_notice[${c_reset} options $c_notice]$c_reset"
echo
echo -e "${c_highlight}Options:$c_reset"
echo -e " -${c_important}h$c_reset, --${c_important}help$c_reset Print this help screen."
if [[ $settings_file == "" ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: no settings file has been defined.$c_reset"
+ echo -e "${c_error}ERROR: No settings file has been defined.$c_reset"
fi
failure=1
elif [[ ! -f $settings_file ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- 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"
+ 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
failure=1
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: failed to create work directories $c_notice${work}programs$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Failed to create work directories $c_notice${work}programs$c_error.$c_reset"
fi
failure=1
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: failed to create work directories $c_notice${work}programs/shared$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Failed to create work directories $c_notice${work}programs/shared$c_error.$c_reset"
fi
failure=1
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: failed to create work directories $c_notice${work}programs/static$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Failed to create work directories $c_notice${work}programs/static$c_error.$c_reset"
fi
failure=1
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: failed to create work directories $c_notice${work}libraries$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Failed to create work directories $c_notice${work}libraries$c_error.$c_reset"
fi
failure=1
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: failed to create work directories $c_notice${work}libraries/shared$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Failed to create work directories $c_notice${work}libraries/shared$c_error.$c_reset"
fi
failure=1
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: failed to create work directories $c_notice${work}libraries/static$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Failed to create work directories $c_notice${work}libraries/static$c_error.$c_reset"
fi
failure=1
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: failed to create work directories $c_notice${work}includes$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Failed to create work directories $c_notice${work}includes$c_error.$c_reset"
fi
failure=1
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- 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"
+ 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
failure=1
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: failed to copy (static) library files from $c_notice$path_build$path_libraries$path_static$c_error to $c_notice$destination_libraries_static$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Failed to copy (static) library files from $c_notice$path_build$path_libraries$path_static$c_error to $c_notice$destination_libraries_static$c_error.$c_reset"
fi
failure=1
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: failed to copy (shared) library files from $c_notice$path_build$path_libraries$path_shared$c_error to $c_notice$destination_libraries_shared$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Failed to copy (shared) library files from $c_notice$path_build$path_libraries$path_shared$c_error to $c_notice$destination_libraries_shared$c_error.$c_reset"
fi
failure=1
local path_build=build/
local path_destination=package/
local path_sources=./
- local verbosity="normal"
+ local verbosity=normal
if [[ $# -gt 0 ]] ; then
t=$#
if [[ $do_help == "yes" ]] ; then
package_help
package_cleanup
+
return 0
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"
+ echo -e "${c_error}ERROR: Only one operation may be specified at a time.$c_reset"
fi
package_cleanup
+
return 1
elif [[ $operation == "build" ]] ; then
if [[ ! -d $path_build ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: build directory '$path_build' is invalid or missing.$c_reset"
+ echo -e "${c_error}ERROR: Build directory '$path_build' is invalid or missing.$c_reset"
fi
package_cleanup
+
return 1
fi
mkdir $verbose -p $path_destination
if [[ $? -ne 0 ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: package directory '$path_destination' is invalid or could not be created.$c_reset"
+ echo -e "${c_error}ERROR: Package directory '$path_destination' is invalid or could not be created.$c_reset"
fi
package_cleanup
+
return 1
fi
fi
if [[ ! -d $path_sources ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: sources directory '$path_sources' is invalid or missing.$c_reset"
+ echo -e "${c_error}ERROR: Sources directory '$path_sources' is invalid or missing.$c_reset"
fi
package_cleanup
+
return 1
fi
if [[ ! -d ${path_sources}level_0/ ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: build sources directory '${path_sources}level_0/' is invalid or missing.$c_reset"
+ echo -e "${c_error}ERROR: Build sources directory '${path_sources}level_0/' is invalid or missing.$c_reset"
fi
package_cleanup
+
return 1
fi
if [[ ! -d ${path_sources}level_1/ ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: build sources directory '${path_sources}level_1/' is invalid or missing.$c_reset"
+ echo -e "${c_error}ERROR: Build sources directory '${path_sources}level_1/' is invalid or missing.$c_reset"
fi
package_cleanup
+
return 1
fi
if [[ ! -d ${path_sources}level_2/ ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: build sources directory '${path_sources}level_2/' is invalid or missing.$c_reset"
+ echo -e "${c_error}ERROR: Build sources directory '${path_sources}level_2/' is invalid or missing.$c_reset"
fi
package_cleanup
+
return 1
fi
if [[ ! -d ${path_sources}level_3/ ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: build sources directory '${path_sources}level_3/' is invalid or missing.$c_reset"
+ echo -e "${c_error}ERROR: Build sources directory '${path_sources}level_3/' is invalid or missing.$c_reset"
fi
package_cleanup
+
return 1
fi
elif [[ $operation == "dependencies" ]] ; then
if [[ ! -d $path_sources ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: sources directory '$path_sources' is invalid or missing.$c_reset"
+ echo -e "${c_error}ERROR: Sources directory '$path_sources' is invalid or missing.$c_reset"
fi
package_cleanup
elif [[ $operation == "clean" ]] ; then
if [[ ! -d $path_destination ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_warning}WARNING: package directory '$path_destination' does not exist, there is nothing to clean.$c_reset"
+ echo -e "${c_warning}WARNING: Package directory '$path_destination' does not exist, there is nothing to clean.$c_reset"
fi
package_cleanup
+
return 0
fi
package_operation_clean
elif [[ $operation == "" ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: no operation was given.$c_reset"
+ echo -e "${c_error}ERROR: No operation was given.$c_reset"
fi
package_cleanup
+
return 1
else
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: the operation $c_notice$operation$c_error was not recognized.$c_reset"
+ echo -e "${c_error}ERROR: The operation $c_notice$operation$c_error was not recognized.$c_reset"
fi
package_cleanup
+
return 1
fi
package_cleanup
+
return 0
}
echo -e "${c_title}$public_name$c_reset"
echo -e " ${c_notice}Version $version$c_reset"
echo
- echo -e "$c_highlight$system_name$c_reset $c_notice<${c_reset}operation$c_notice>$c_reset"
+ echo -e "$c_highlight$system_name$c_reset $c_notice[${c_reset} options $c_notice]$c_reset $c_notice[${c_reset} operation $c_notice]$c_reset"
echo -e " ${c_important}build${c_reset} Build the package."
echo -e " ${c_important}dependencies${c_reset} Rebuild all dependencies."
echo -e " ${c_important}clean${c_reset} Delete all built packages."
fi
else
if [[ $verbosity != "quiet" ]] ; then
- 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"
+ 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
let failure=1
if [[ ! -f ${directory}/data/build/dependencies ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: cannot build dependencies, failed to find $c_notice${directory}/data/build/dependencies$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Cannot build dependencies, failed to find $c_notice${directory}/data/build/dependencies$c_error.$c_reset"
fi
let failure=1
if [[ ! -f ${directory}/data/build/settings ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: cannot build dependencies for $c_reset$c_notice${name}$c_reset${c_error}, failed to find $c_notice${directory}/data/build/settings$c_error.$c_reset"
+ echo -e "${c_error}ERROR: Cannot build dependencies for $c_reset$c_notice${name}$c_reset${c_error}, failed to find $c_notice${directory}/data/build/settings$c_error.$c_reset"
fi
let failure=1
level=level_2
else
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_warning}WARNING: failed to detect level for dependency $c_notice$dependency$c_warning.$c_reset"
+ echo -e "${c_warning}WARNING: Failed to detect level for dependency $c_notice$dependency$c_warning.$c_reset"
fi
continue
sub_level=level_1
else
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_warning}WARNING: failed to detect level for sub-dependency $c_notice$sub_dependency$c_warning.$c_reset"
+ echo -e "${c_warning}WARNING: Failed to detect level for sub-dependency $c_notice$sub_dependency$c_warning.$c_reset"
fi
continue
sub_sub_level=level_0
else
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_warning}WARNING: failed to detect level for sub-sub-dependency $c_notice$sub_sub_dependency$c_warning.$c_reset"
+ echo -e "${c_warning}WARNING: Failed to detect level for sub-sub-dependency $c_notice$sub_sub_dependency$c_warning.$c_reset"
fi
continue
if [[ ! -d $path_build$level ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: build settings directory $c_notice$path_build$level$c_error is invalid or missing.$c_reset"
+ echo -e "${c_error}ERROR: Build settings directory $c_notice$path_build$level$c_error is invalid or missing.$c_reset"
fi
let failure=1
if [[ ! -d ${path_build}monolithic ]] ; then
if [[ $verbosity != "quiet" ]] ; then
- echo -e "${c_error}ERROR: build settings directory $c_notice${path_build}monolithic$c_error is invalid or missing.$c_reset"
+ echo -e "${c_error}ERROR: Build settings directory $c_notice${path_build}monolithic$c_error is invalid or missing.$c_reset"
fi
package_cleanup