Blame subr/pkg_install_strip.subr

Lucio Andrés Illanes Albornoz 378fac
#
Lucio Andrés Illanes Albornoz 378fac
# set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz 378fac
#
Lucio Andrés Illanes Albornoz 378fac
Lucio Andrés Illanes Albornoz d279a9
pkg_install_strip() {
Lucio Andrés Illanes Albornoz d279a9
	local _tree_root="${PKG_DESTDIR}" _bin_path="";
Lucio Andrés Illanes Albornoz d279a9
	if [ -e "${_tree_root}" ]\
Lucio Andrés Illanes Albornoz d279a9
	&& [ "${BUILD}" != release ]; then
Lucio Andrés Illanes Albornoz d279a9
		if [ "${PKG_NAME%_minipix}" != "${PKG_NAME}" ]\
Lucio Andrés Illanes Albornoz d279a9
		&& [ "${ARG_DEBUG_MINIPIX:-0}" -eq 1 ]; then
Lucio Andrés Illanes Albornoz d279a9
			return;
Lucio Andrés Illanes Albornoz 378fac
		fi;
Lucio Andrés Illanes Albornoz d279a9
		for _bin_path in $(find "${_tree_root}" -perm /a=x	\
Lucio Andrés Illanes Albornoz d279a9
				\( -type f -or -type l \)); do
Lucio Andrés Illanes Albornoz d279a9
			if objdump -sj .debug_info "${_bin_path}" >/dev/null 2>&1; then
Lucio Andrés Illanes Albornoz d279a9
				ex_rtl_log_msg info "Stripping ${_bin_path}...";
Lucio Andrés Illanes Albornoz d279a9
				ex_rtl_log_msg vnfo "${PKG_TARGET}-strip ${_bin_path}";
Lucio Andrés Illanes Albornoz d279a9
				${PKG_TARGET}-strip ${_bin_path};
Lucio Andrés Illanes Albornoz d279a9
			fi;
Lucio Andrés Illanes Albornoz d279a9
		done;
Lucio Andrés Illanes Albornoz d279a9
	fi;
Lucio Andrés Illanes Albornoz 378fac
};
Lucio Andrés Illanes Albornoz 378fac
Lucio Andrés Illanes Albornoz 378fac
# vim:filetype=sh