if [[ "${ALL}" == "*" ]] || [[ "${INTERNAL}" == true ]]; then
log "ALL(*) and internal is not supported"
+ return 1
else
log "+ copy necessary files .."
for i in $(xmlstarlet sel -t -m "//necessary/file" -o "." -v "text()" -o " " -n ${xml_file}); do
log "Error Occurred Copy file .... " 1>&2
exit $ERROR_NOT_EXIST_FILE
fi
+
+ return 0
}
function copy_package_config()
{
local src_dir=$1
local dest_dir=$2
+ local xml_file=$3
log "***************** $FUNCNAME *****************"
log "+ source directory : ${src_dir}"
log "+ destination dierctory : ${dest_dir}"
+ log "+ xml source file : ${xml_file}"
- if [[ ! -d "${src_dir}/usr/lib/pkgconfig" ]]; then
- log "+ no pkgconfig directory(${src_dir}/usr/lib/pkgconfig)"
+ local pc_fname="$(xmlstarlet sel -t -v '//rootstrap/@name' ${item}).pc"
+ local src_pc_file_path="${src_dir}/usr/lib/pkgconfig/${pc_fname}"
+ local dest_pc_path="${dest_dir}/usr/lib/pkgconfig"
+
+ if [[ ! -f "${src_pc_file_path}" ]]; then
+ log "+ no pkgconfig file(${src_pc_file_path})"
return 1
fi
- cd ${src_dir}
- local dest_path="${dest_dir}/usr/lib/pkgconfig"
- mkdir -p ${dest_path}
- cp -P -R ./usr/lib/pkgconfig/* "${dest_path}"
- cd -
+ mkdir -p ${dest_pc_path}
+ cp -P "${src_pc_file_path}" "${dest_pc_path}/."
}
function check_prerequisite()
#copy only header & so to dest
copy_header_and_so ${BUILD_REQUIRED_INSTALLED_PATH} ${GBS_BUILDROOT} ${item}
+ if [[ $? -ne 0 ]]; then
+ echo "Failed to copy_header_and_so for ${item}, skip."
+ continue
+ fi
+
+ copy_package_config ${BUILD_REQUIRED_INSTALLED_PATH} ${GBS_BUILDROOT} ${item}
#get build option from xml
#get_build_option $item
done #finish copy header & library
-copy_package_config ${BUILD_REQUIRED_INSTALLED_PATH} ${GBS_BUILDROOT}
##################################################################
#postlink for delete needed field from Library