Conan_Kudo / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone

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 26510d
	&& [ "${BUILD}" = release ]\
Lucio Andrés Illanes Albornoz 020a8e
	&& [ "${PKG_BUILD_TYPE}" = native ]; 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 26510d
		for _bin_path in $(find "${_tree_root}" -perm /a=x -type f); 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