From: Kevin Day Date: Sun, 2 Jul 2023 02:35:40 +0000 (-0500) Subject: Bugfix: The build scripts are not handling documentation directory. X-Git-Tag: 0.6.6~7 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=3bed181244d1bd1698c72fbd0d0d502864f62398;p=fll Bugfix: The build scripts are not handling documentation directory. The man pages are not being correctly copied over, if at all. --- diff --git a/build/scripts/bootstrap.sh b/build/scripts/bootstrap.sh index d4d94df..fb49056 100644 --- a/build/scripts/bootstrap.sh +++ b/build/scripts/bootstrap.sh @@ -250,7 +250,7 @@ bootstrap_main() { done fi - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then bootstrap_cleanup return 1 @@ -258,7 +258,7 @@ bootstrap_main() { bootstrap_load_settings_mode - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then bootstrap_cleanup return 1 @@ -460,7 +460,7 @@ bootstrap_main() { if [[ ! -f ${project_built}.prepared ]] ; then bootstrap_prepare_build - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then bootstrap_cleanup return 1 @@ -469,7 +469,7 @@ bootstrap_main() { bootstrap_operation_build - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then bootstrap_cleanup return 1 @@ -1057,7 +1057,7 @@ bootstrap_prepare_build() { local alt=${1} local i= - mkdir ${verbose_common} -p ${path_build}{documents,includes,libraries/{script,shared,static},objects/{script,shared,static},programs/{script,shared,static},settings,stage} || failure=1 + mkdir ${verbose_common} -p ${path_build}{documents,documentation,includes,libraries/{script,shared,static},objects/{script,shared,static},programs/{script,shared,static},settings,stage} || failure=1 if [[ ${failure} -eq 1 ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then @@ -1637,7 +1637,7 @@ bootstrap_operation_build() { if [[ ${directory} != "." && ! -d ${path_build}objects/${directory} ]] ; then mkdir ${verbose_common} -p ${path_build}objects/${directory} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then let failure=1 break; @@ -3023,7 +3023,7 @@ bootstrap_operation_clean() { local i= - for i in ${path_build}{documents,includes,libraries,objects,programs,settings,stage} ; do + for i in ${path_build}{documents,documentation,includes,libraries,objects,programs,settings,stage} ; do if [[ -e ${i} ]] ; then rm ${verbose_common} -Rf ${i} fi diff --git a/build/scripts/install.sh b/build/scripts/install.sh index fa80a36..626a57d 100644 --- a/build/scripts/install.sh +++ b/build/scripts/install.sh @@ -580,7 +580,7 @@ install_perform_install() { if [[ ! -d ${destination_prefix} ]] ; then mkdir ${verbose_common} ${destination_prefix} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -595,7 +595,7 @@ install_perform_install() { if [[ -d ${path_build}${path_programs} && ! -d ${destination_programs} ]] ; then mkdir ${verbose_common} ${destination_programs} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -609,7 +609,7 @@ install_perform_install() { if [[ ${enable_shared_programs} == "yes" && -d ${path_build}${path_programs}${path_shared} && ! -d ${destination_programs_shared} ]] ; then mkdir ${verbose_common} ${destination_programs_shared} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -623,7 +623,7 @@ install_perform_install() { if [[ ${enable_static_programs} == "yes" && -d ${path_build}${path_programs}${path_static} && ! -d ${destination_programs_static} ]] ; then mkdir ${verbose_common} ${destination_programs_static} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -639,7 +639,7 @@ install_perform_install() { if [[ -d ${path_build}${path_libraries} && ! -d ${destination_libraries} ]] ; then mkdir ${verbose_common} ${destination_libraries} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -653,7 +653,7 @@ install_perform_install() { if [[ ${enable_shared_libraries} == "yes" && -d ${path_build}${path_libraries}${path_shared} && ! -d ${destination_libraries_shared} ]] ; then mkdir ${verbose_common} ${destination_libraries_shared} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -667,7 +667,7 @@ install_perform_install() { if [[ ${enable_static_libraries} == "yes" && -d ${path_build}${path_libraries}${path_static} && ! -d ${destination_libraries_static} ]] ; then mkdir ${verbose_common} ${destination_libraries_static} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -683,7 +683,7 @@ install_perform_install() { if [[ -d ${path_build}${path_includes} && ! -d ${destination_includes} ]] ; then mkdir ${verbose_common} ${destination_includes} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -699,7 +699,7 @@ install_perform_install() { if [[ -d ${path_build}${path_documentation} && ! -d ${destination_documentation} ]] ; then mkdir ${verbose_common} ${destination_documentation} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -715,7 +715,7 @@ install_perform_install() { if [[ -d ${path_build}${path_settings} && ! -d ${destination_settings} ]] ; then mkdir ${verbose_common} ${destination_settings} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -748,7 +748,7 @@ install_perform_install() { cp ${verbose_common} -R ${path_build}${path_includes}* ${destination_includes} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -782,7 +782,7 @@ install_perform_install() { cp ${verbose_common} -R ${path_build}${path_libraries}${path_static}* ${destination_libraries_static} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -815,7 +815,7 @@ install_perform_install() { cp ${verbose_common} -R ${path_build}${path_libraries}${path_shared}* ${destination_libraries_shared} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -850,7 +850,7 @@ install_perform_install() { cp ${verbose_common} -R ${path_build}${path_programs}${path_static}* ${destination_programs_static} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -883,7 +883,7 @@ install_perform_install() { cp ${verbose_common} -R ${path_build}${path_programs}${path_shared}* ${destination_programs_shared} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -917,7 +917,7 @@ install_perform_install() { cp ${verbose_common} -R ${path_build}${path_settings}* ${destination_settings} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first @@ -950,7 +950,7 @@ install_perform_install() { cp ${verbose_common} -R ${path_build}${path_documentation}* ${destination_documentation} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then install_print_first diff --git a/build/scripts/package.sh b/build/scripts/package.sh index 5147be0..3c0c90d 100644 --- a/build/scripts/package.sh +++ b/build/scripts/package.sh @@ -72,7 +72,7 @@ package_main() { p=${!i} fi - if [[ $grab_next == "" ]] ; then + if [[ ${grab_next} == "" ]] ; then if [[ ${p} == "-h" || ${p} == "--help" ]] ; then do_help=yes elif [[ ${p} == "+C" || ${p} == "++copyright" ]] ; then @@ -134,15 +134,15 @@ package_main() { operation="${p}" fi else - if [[ $grab_next == "path_build" ]] ; then + if [[ ${grab_next} == "path_build" ]] ; then path_build=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|') - elif [[ $grab_next == "path_destination" ]] ; then + elif [[ ${grab_next} == "path_destination" ]] ; then path_destination=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|') - elif [[ $grab_next == "path_sources" ]] ; then + elif [[ ${grab_next} == "path_sources" ]] ; then path_sources=$(echo ${p} | sed -e 's|^//*|/|' -e 's|/*$|/|') - elif [[ $grab_next == "stand_alone" ]] ; then + elif [[ ${grab_next} == "stand_alone" ]] ; then mode_stand_alone="${mode_stand_alone}${p} " - elif [[ $grab_next == "prepend" ]] ; then + elif [[ ${grab_next} == "prepend" ]] ; then # Provide a bare minimal sanitizer that probably doesn't catch everything that it ideally should. prepend=$(echo ${p} | sed -e 's|[\!~\`@#$%^&*();:>.*\$|build_libraries-level -lfll_2 -lfll_1 -lfll_0|" ${settings} && sed -i -e "s|^\s*build_libraries-level\$|build_libraries-level -lfll_2 -lfll_1 -lfll_0|" ${settings} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1024,7 +958,7 @@ package_dependencies_individual() { sed -i -e "s|^\s*build_libraries-monolithic\>.*\$|build_libraries-monolithic -lfll|" ${settings} && sed -i -e "s|^\s*build_libraries-monolithic\$|build_libraries-monolithic -lfll|" ${settings} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1230,7 +1164,7 @@ package_dependencies_level_update() { sed -i -e "s|^\s*build_libraries-level_threadless\s.*\$|build_libraries-level_threadless${level_libraries}|" ${settings} && sed -i -e "s|^\s*build_libraries-level_threadless\$|build_libraries-level_threadless${level_libraries}|" ${settings} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1253,7 +1187,7 @@ package_dependencies_level_update() { sed -i -e "s|^\s*build_sources_library-level\s.*\$|build_sources_library-level${level_sources_library_threaded}|" ${settings} && sed -i -e "s|^\s*build_sources_library-level\$|build_sources_library-level${level_sources_library_threaded}|" ${settings} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1276,7 +1210,7 @@ package_dependencies_level_update() { sed -i -e "s|^\s*build_sources_headers-level\s.*\$|build_sources_headers-level${level_sources_headers_threaded}|" ${settings} && sed -i -e "s|^\s*build_sources_headers-level\$|build_sources_headers-level${level_sources_headers_threaded}|" ${settings} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1426,7 +1360,7 @@ package_dependencies_monolithic() { sed -i -e "s|^\s*build_sources_library-monolithic\s.*\$|build_sources_library-monolithic${monolithic_libraries_threaded}|" ${settings} && sed -i -e "s|^\s*build_sources_library-monolithic\$|build_sources_library-monolithic${monolithic_libraries_threaded}|" ${settings} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1459,7 +1393,7 @@ package_dependencies_monolithic() { sed -i -e "s|^\s*build_sources_headers-monolithic\s.*\$|build_sources_headers-monolithic${monolithic_headers_threaded}|" ${settings} && sed -i -e "s|^\s*build_sources_headers-monolithic\$|build_sources_headers-monolithic${monolithic_headers_threaded}|" ${settings} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1487,7 +1421,7 @@ package_operation_clean() { if [[ -d ${path_destination}individual ]] ; then rm ${verbose_common} -Rf ${path_destination}individual - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then let failure=1 return 1 @@ -1505,7 +1439,7 @@ package_operation_clean() { if [[ -d ${path_destination}level ]] ; then rm ${verbose_common} -Rf ${path_destination}level - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then let failure=1 return 1 @@ -1523,7 +1457,7 @@ package_operation_clean() { if [[ -d ${path_destination}monolithic ]] ; then rm ${verbose_common} -Rf ${path_destination}monolithic - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then let failure=1 return 1 @@ -1541,7 +1475,7 @@ package_operation_clean() { if [[ -d ${path_destination}program ]] ; then rm ${verbose_common} -Rf ${path_destination}program - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then let failure=1 return 1 @@ -1563,7 +1497,7 @@ package_operation_clean() { if [[ -d ${path_destination}stand_alone/${prepend}${i}-${version}/ ]] ; then rm ${verbose_common} -Rf ${path_destination}stand_alone/${prepend}${i}-${version}/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then let failure=1 return 1 @@ -1595,7 +1529,7 @@ package_operation_copy_package() { if [[ -d ${package}sources/data/ ]] ; then cp ${verbose_common} -R ${package}sources/data ${package} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1609,7 +1543,7 @@ package_operation_copy_package() { rm ${verbose_common} -Rf ${package}sources/data - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1627,7 +1561,7 @@ package_operation_copy_package() { if [[ -d ${package}sources/documents/ ]] ; then cp ${verbose_common} -R ${package}sources/documents/ ${package} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1641,7 +1575,7 @@ package_operation_copy_package() { rm ${verbose_common} -Rf ${package}sources/documents/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1657,7 +1591,7 @@ package_operation_copy_package() { if [[ -d ${package}sources/licenses/ ]] ; then cp ${verbose_common} -R ${package}sources/licenses/ ${package} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1671,7 +1605,7 @@ package_operation_copy_package() { rm ${verbose_common} -Rf ${package}sources/licenses/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1687,7 +1621,7 @@ package_operation_copy_package() { if [[ -d ${package}sources/specifications/ ]] ; then cp ${verbose_common} -R ${package}sources/specifications/ ${package} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1701,7 +1635,7 @@ package_operation_copy_package() { rm ${verbose_common} -Rf ${package}sources/specifications/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1717,7 +1651,7 @@ package_operation_copy_package() { if [[ -d ${package}sources/tests/ ]] ; then cp ${verbose_common} -R ${package}sources/tests/ ${package} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1731,7 +1665,7 @@ package_operation_copy_package() { rm ${verbose_common} -Rf ${package}sources/tests/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1765,7 +1699,7 @@ package_operation_create_config_stubs() { if [[ $(grep -soP '^\s*\bbuild_sources_program\b\s+\S' ${package}data/build/settings) != "" ]] ; then sed -i -E -e "s|^\s*\bbuild_sources_program\s+|&config.c |" ${package}data/build/settings - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1779,7 +1713,7 @@ package_operation_create_config_stubs() { elif [[ $(grep -soP '^\s*\bbuild_sources_library\b\s+\S' ${package}data/build/settings) != "" ]] ; then sed -i -E -e "s|^\s*\bbuild_sources_library\s+|&config.c |" ${package}data/build/settings - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1796,7 +1730,7 @@ package_operation_create_config_stubs() { echo > ${package}sources/c/config.c && echo "#include \"config.h\"" >> ${package}sources/c/config.c - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1812,7 +1746,7 @@ package_operation_create_config_stubs() { if [[ $(grep -soP '^\s*\bbuild_sources_program\b\s+\S' ${package}data/build/settings) != "" ]] ; then sed -i -E -e "s|^\s*\bbuild_sources_program\s+|&config.cpp |" ${package}data/build/settings - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1826,7 +1760,7 @@ package_operation_create_config_stubs() { elif [[ $(grep -soP '^\s*\bbuild_sources_library\b\s+\S' ${package}data/build/settings) != "" ]] ; then sed -i -E -e "s|^\s*\bbuild_sources_library\s+|&config.cpp |" ${package}data/build/settings - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1843,7 +1777,7 @@ package_operation_create_config_stubs() { echo > ${package}sources/c++/config.cpp && echo "#include \"config.h\"" >> ${package}sources/c++/config.cpp - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1861,7 +1795,7 @@ package_operation_create_config_stubs() { if [[ $(grep -soP '^\s*\bbuild_language\b\s+c\s*$' ${package}data/build/settings) != "" ]] ; then echo > ${package}sources/c/config.h - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1875,7 +1809,7 @@ package_operation_create_config_stubs() { else echo > ${package}sources/c++/config.h - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1925,7 +1859,7 @@ package_operation_individual() { if [[ ! -d ${path_destination}individual ]] ; then mkdir ${verbose_common} -p ${path_destination}individual - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -1951,7 +1885,7 @@ package_operation_individual() { cp ${verbose_common} -R ${directory} ${package}sources/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2011,7 +1945,7 @@ package_operation_level() { if [[ ! -d ${package}data/ ]] ; then mkdir ${verbose_common} ${package}data/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2030,7 +1964,7 @@ package_operation_level() { cp ${verbose_common} -R ${path_build}${level} ${package}data/build fi - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2045,7 +1979,7 @@ package_operation_level() { if [[ ! -d ${package}sources/ ]] ; then mkdir ${verbose_common} ${package}sources/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2062,7 +1996,7 @@ package_operation_level() { cp ${verbose_common} -R ${directory}/* ${package}sources/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2076,7 +2010,7 @@ package_operation_level() { rm ${verbose_common} -Rf ${package}sources/data/build/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2140,7 +2074,7 @@ package_operation_monolithic() { if [[ ! -d ${package}data/ ]] ; then mkdir ${verbose_common} ${package}data/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2159,7 +2093,7 @@ package_operation_monolithic() { cp ${verbose_common} -R ${path_build}monolithic ${package}data/build fi - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2174,7 +2108,7 @@ package_operation_monolithic() { if [[ ! -d ${package}sources/ ]] ; then mkdir ${verbose_common} ${package}sources/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2190,7 +2124,7 @@ package_operation_monolithic() { if [[ ! -d ${package}tests/ ]] ; then mkdir ${verbose_common} ${package}tests/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2215,7 +2149,7 @@ package_operation_monolithic() { if [[ ! -d ${package}data/${level} ]] ; then mkdir ${verbose_common} -p ${package}data/${level} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2230,7 +2164,7 @@ package_operation_monolithic() { cp ${verbose_common} -R ${directory_sub} ${package}sources/data - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2244,7 +2178,7 @@ package_operation_monolithic() { rm ${verbose_common} -Rf ${package}sources/data/build/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2259,7 +2193,7 @@ package_operation_monolithic() { if [[ "$(ls ${package}sources/data)" != "" ]] ; then cp ${verbose_common} -R ${package}sources/data/* ${package}data/${level} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2274,7 +2208,7 @@ package_operation_monolithic() { rm ${verbose_common} -Rf ${package}sources/data - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2285,67 +2219,105 @@ package_operation_monolithic() { break fi - elif [[ ${path_name} == "documents" ]] ; then - cp ${verbose_common} -R ${directory_sub} ${package}sources/ - if [[ $? -ne 0 ]] ; then + if [[ -d ${package}data/${level}/documentation ]] ; then + cp ${verbose_common} -R ${package}data/${level}/documentation ${package}data/ + + if [[ ${?} -ne 0 ]] ; then + if [[ ${verbosity} != "quiet" ]] ; then + package_print_first + + echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${package}data/${level}/documentation${c_error} into ${c_notice}${package}data${c_error}.${c_reset}" + fi + + let failure=1 + + break + fi + fi + + rm ${verbose_common} -Rf ${package}data/${level}/documentation + + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first - echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/documents${c_error}.${c_reset}" + echo -e "${c_error}ERROR: Failed to remove directory ${c_notice}${package}data/${level}/documentation${c_error}.${c_reset}" fi let failure=1 break fi - elif [[ ${path_name} == "licenses" ]] ; then - cp ${verbose_common} -R ${directory_sub} ${package}sources/ + elif [[ ${path_name} == "documents" ]] ; then + if [[ -d ${directory_sub} ]] ; then + cp ${verbose_common} -R ${directory_sub} ${package}sources/ - if [[ $? -ne 0 ]] ; then - if [[ ${verbosity} != "quiet" ]] ; then - package_print_first + if [[ ${?} -ne 0 ]] ; then + if [[ ${verbosity} != "quiet" ]] ; then + package_print_first + + echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/documents${c_error}.${c_reset}" + fi - echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/licenses${c_error}.${c_reset}" + let failure=1 + + break fi + fi + elif [[ ${path_name} == "licenses" ]] ; then + if [[ -d ${directory_sub} ]] ; then + cp ${verbose_common} -R ${directory_sub} ${package}sources/ - let failure=1 + if [[ ${?} -ne 0 ]] ; then + if [[ ${verbosity} != "quiet" ]] ; then + package_print_first - break + echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/licenses${c_error}.${c_reset}" + fi + + let failure=1 + + break + fi fi elif [[ ${path_name} == "specifications" ]] ; then - cp ${verbose_common} -R ${directory_sub} ${package}sources/ + if [[ -d ${directory_sub} ]] ; then + cp ${verbose_common} -R ${directory_sub} ${package}sources/ - if [[ $? -ne 0 ]] ; then - if [[ ${verbosity} != "quiet" ]] ; then - package_print_first + if [[ ${?} -ne 0 ]] ; then + if [[ ${verbosity} != "quiet" ]] ; then + package_print_first - echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/specifications${c_error}.${c_reset}" - fi + echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/specifications${c_error}.${c_reset}" + fi - let failure=1 + let failure=1 - break + break + fi fi elif [[ ${path_name} == "tests" ]] ; then - cp ${verbose_common} -R ${directory_sub} ${package} + if [[ -d ${directory_sub} ]] ; then + cp ${verbose_common} -R ${directory_sub} ${package} - if [[ $? -ne 0 ]] ; then - if [[ ${verbosity} != "quiet" ]] ; then - package_print_first + if [[ ${?} -ne 0 ]] ; then + if [[ ${verbosity} != "quiet" ]] ; then + package_print_first - echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}tests${c_error}.${c_reset}" - fi + echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}tests${c_error}.${c_reset}" + fi - let failure=1 + let failure=1 - break + break + fi fi else if [[ ! -d ${package}sources/${path_name}/${level} ]] ; then mkdir ${verbose_common} -p ${package}sources/${path_name}/${level} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2360,7 +2332,7 @@ package_operation_monolithic() { cp ${verbose_common} -R ${directory_sub}/* ${package}sources/${path_name}/${level} - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2387,7 +2359,7 @@ package_operation_monolithic() { if [[ ${failure} -eq 0 ]] ; then package_operation_create_config_stubs - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then let failure=1 fi fi @@ -2407,7 +2379,7 @@ package_operation_program() { if [[ ! -d ${path_destination}program ]] ; then mkdir ${verbose_common} -p ${path_destination}program - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2435,7 +2407,7 @@ package_operation_program() { cp ${verbose_common} -R ${directory} ${package}sources/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2449,7 +2421,7 @@ package_operation_program() { package_operation_copy_package - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then let failure=1 break @@ -2480,7 +2452,7 @@ package_operation_stand_alone() { if [[ ! -d ${path_destination}stand_alone ]] ; then mkdir ${verbose_common} -p ${path_destination}stand_alone - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2506,7 +2478,7 @@ package_operation_stand_alone() { package_create_base_files - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then let failure=1 break @@ -2514,7 +2486,7 @@ package_operation_stand_alone() { cp ${verbose_common} -R ${directory} ${package}sources/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2528,7 +2500,7 @@ package_operation_stand_alone() { package_operation_copy_package - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then let failure=1 break @@ -2536,7 +2508,7 @@ package_operation_stand_alone() { cp ${verbose_common} -R ${path_build}stand_alone/${name}.settings ${package}data/build/settings - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2550,7 +2522,7 @@ package_operation_stand_alone() { cp ${verbose_common} -R ${path_build}stand_alone/${name}.fakefile ${package}data/build/fakefile - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2565,7 +2537,7 @@ package_operation_stand_alone() { if [[ ! -d ${package}sources/c/program/${name}/ ]] ; then mkdir ${verbose_common} -p ${package}sources/c/program/${name}/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2595,7 +2567,7 @@ package_operation_stand_alone() { if [[ ! -d ${package}sources/${path_name}/program/${name}/ ]] ; then mkdir ${verbose_common} -p ${package}sources/${path_name}/program/${name}/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2610,7 +2582,7 @@ package_operation_stand_alone() { mv ${verbose_common} ${path_sub} ${package}sources/${path_name}/program/${name}/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2635,7 +2607,7 @@ package_operation_stand_alone() { if [[ -f ${path_build}stand_alone/${name}.config.h ]] ; then cp ${verbose_common} -R ${path_build}stand_alone/${name}.config.h ${package}sources/c/config.h - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2680,7 +2652,7 @@ package_operation_stand_alone() { if [[ ! -d ${package}sources/${path_name}/fll/${level}/ ]] ; then mkdir ${verbose_common} -p ${package}sources/${path_name}/fll/${level}/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first @@ -2695,7 +2667,7 @@ package_operation_stand_alone() { cp ${verbose_common} -R ${directory_level}${path_name}/* ${package}sources/${path_name}/fll/${level}/ - if [[ $? -ne 0 ]] ; then + if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then package_print_first