Blob Blame History Raw
#
# set -o errexit -o noglob are assumed.
#

pkg_strip() {
	local _tree_root="${PKG_DESTDIR}/bin" _bin_path;
	if [ ! -e "${_tree_root}" ]; then
		return;
	fi;
	for _bin_path in $(find "${_tree_root}" -perm /a=x	\
			\( -type f -or -type l \)); do
		set +o errexit;
		if objdump -sj .debug_info "${_bin_path}" >/dev/null 2>&1; then
			ex_rtl_log_msg info "Stripping ${_bin_path}...";
			ex_rtl_log_msg vnfo "${PKG_TARGET}-strip ${_bin_path}";
			${PKG_TARGET}-strip ${_bin_path};
		fi;
		set -o errexit;
	done;
};

# vim:filetype=sh