grab_next=path_sources
elif [[ ${p} == "-S" || ${p} == "--stand_alone" ]] ; then
grab_next=stand_alone
- elif [[ $operation == "" ]] ; then
+ elif [[ ${operation} == "" ]] ; then
operation="${p}"
- elif [[ $operation_failure == "" ]] ; then
+ elif [[ ${operation_failure} == "" ]] ; then
operation_failure=fail-multiple
operation="${p}"
fi
if [[ ! -d ${path_destination} ]] ; then
mkdir ${verbose_common} -p ${path_destination}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
if [[ ${operation} == "rebuild" ]] ; then
package_operation_clean
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
failure=1
fi
fi
if [[ ${failure} -eq 0 && ${mode_individual} == "yes" ]] ; then
package_operation_individual
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
failure=1
fi
fi
if [[ ${failure} -eq 0 && ${mode_level} == "yes" ]] ; then
package_operation_level
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
failure=1
fi
fi
if [[ ${failure} -eq 0 && ${mode_monolithic} == "yes" ]] ; then
package_operation_monolithic
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
failure=1
fi
fi
if [[ ${failure} -eq 0 && ${mode_program} == "yes" ]] ; then
package_operation_program
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
failure=1
fi
fi
if [[ ${failure} -eq 0 && ${mode_stand_alone} != "" ]] ; then
package_operation_stand_alone
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
failure=1
fi
fi
if [[ ! -d ${package} ]] ; then
mkdir ${verbose_common} -p ${package}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
fi
fi
- if [[ ${failure} -eq 0 && ! -d ${path_build}documents ]] ; then
- if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
- echo -e "${c_error}ERROR: The build directory ${c_notice}${path_build}documents${c_error} cannot be found or is invalid.${c_reset}"
- fi
-
- let failure=1
- fi
-
- if [[ ${failure} -eq 0 ]] ; then
+ if [[ ${failure} -eq 0 && -d ${path_build}documents ]] ; then
cp ${verbose_common} -R ${path_build}documents ${package}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
if [[ -d ${path_build}licenses ]] ; then
cp ${verbose_common} -R ${path_build}licenses ${package}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
elif [[ -d ${path_build}../licenses ]] ; then
cp ${verbose_common} -R ${path_build}../licenses ${package}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
if [[ ${failure} -eq 0 ]] ; then
cp ${verbose_common} -R ${path_build}scripts/bootstrap.sh ${package}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
if [[ ${failure} -eq 0 ]] ; then
chmod ugo+x ${package}bootstrap.sh
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
if [[ ${failure} -eq 0 ]] ; then
cp ${verbose_common} -R ${path_build}scripts/install.sh ${package}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
if [[ ${failure} -eq 0 ]] ; then
chmod ugo+x ${package}install.sh
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
fi
fi
- if [[ ${failure} -eq 1 && ! -d ${package}build ]] ; then
- mkdir ${verbose_common} -p ${package}build
-
- if [[ $? -ne 0 ]] ; then
- if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
- echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}build${c_error}.${c_reset}"
- fi
-
- let failure=1
- fi
- fi
-
- if [[ ${failure} -eq 1 && ! -d ${package}sources ]] ; then
- mkdir ${verbose_common} -p ${package}sources
-
- if [[ $? -ne 0 ]] ; then
- if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
- echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}sources${c_error}.${c_reset}"
- fi
-
- let failure=1
- fi
- fi
-
- if [[ ${failure} -eq 1 && ! -d ${package}documents ]] ; then
- mkdir ${verbose_common} -p ${package}documents
-
- if [[ $? -ne 0 ]] ; then
- if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
- echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}documents${c_error}.${c_reset}"
- fi
-
- let failure=1
- fi
- fi
-
- if [[ ${failure} -eq 1 && ! -d ${package}licenses ]] ; then
- mkdir ${verbose_common} -p ${package}licenses
-
- if [[ $? -ne 0 ]] ; then
- if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
- echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}licenses${c_error}.${c_reset}"
- fi
-
- let failure=1
- fi
- fi
-
if [[ ${failure} -eq 1 ]] ; then
return 1
fi
sed -i -e "s|^\s*build_libraries-individual[[:space:]].*\$|build_libraries-individual${dependencies_individual}|" ${settings} &&
sed -i -e "s|^\s*build_libraries-individual\$|build_libraries-individual${dependencies_individual}|" ${settings}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
sed -i -e "s|^\s*build_libraries-individual_threadless[[:space:]].*\$|build_libraries-individual_threadless${dependencies_individual_threadless}|" ${settings} &&
sed -i -e "s|^\s*build_libraries-individual_threadless\$|build_libraries-individual_threadless${dependencies_individual_threadless}|" ${settings}
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
sed -i -e "s|^\s*build_libraries-level\>.*\$|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
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
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
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
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
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
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
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
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
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
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
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
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
rm ${verbose_common} -Rf ${package}sources/data
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
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
rm ${verbose_common} -Rf ${package}sources/documents/
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
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
rm ${verbose_common} -Rf ${package}sources/licenses/
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
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
rm ${verbose_common} -Rf ${package}sources/specifications/
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
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
rm ${verbose_common} -Rf ${package}sources/tests/
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
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
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
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
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
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
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
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
else
echo > ${package}sources/c++/config.h
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
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
cp ${verbose_common} -R ${directory} ${package}sources/
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
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
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
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
cp ${verbose_common} -R ${directory}/* ${package}sources/
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
rm ${verbose_common} -Rf ${package}sources/data/build/
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
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
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
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
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
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
cp ${verbose_common} -R ${directory_sub} ${package}sources/data
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
rm ${verbose_common} -Rf ${package}sources/data/build/
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
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
rm ${verbose_common} -Rf ${package}sources/data
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
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
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
if [[ ${failure} -eq 0 ]] ; then
package_operation_create_config_stubs
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
fi
fi
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
cp ${verbose_common} -R ${directory} ${package}sources/
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
package_operation_copy_package
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
break
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
package_create_base_files
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
break
cp ${verbose_common} -R ${directory} ${package}sources/
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
package_print_first
package_operation_copy_package
- if [[ $? -ne 0 ]] ; then
+ if [[ ${?} -ne 0 ]] ; then
let failure=1
break
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
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
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
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
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
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
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
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