Conan_Kudo / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone

Blame subr/post_strip.subr

Lucio Andrés Illanes Albornoz (arab, vxp) 7a180c
#
Lucio Andrés Illanes Albornoz (arab, vxp) 802215
# set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 7a180c
#
Lucio Andrés Illanes Albornoz (arab, vxp) 7a180c
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
postp_strip_files() {
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
	local _pname="${1}";
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
	for __ in $(find "${_pname}" -perm -0100 \( -type f -or -type l \)); do
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
		if objdump -sj .debug_info "${__}" >/dev/null 2>&1; then
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
			log_msg vnfo "${TARGET}-strip ${__}";
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
			set +o errexit; ${TARGET}-strip ${__}; set -o errexit;
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
		fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
	done;
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
};
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
Lucio Andrés Illanes Albornoz (arab, vxp) 154865
post_strip() {
Lucio Andrés Illanes Albornoz (arab, vxp) 802215
	local __;
Lucio Andrés Illanes Albornoz (arab, vxp) 05e618
	if [ "${BUILD}" = release ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
		log_msg info "Stripping ${PREFIX_NATIVE}/bin...";
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
		postp_strip_files ${PREFIX_NATIVE}/bin;
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
	if [ ${ARG_DEBUG_MINIPIX:-0} -eq 0 ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
		log_msg info "Stripping ${PREFIX_MINIPIX}/bin...";
Lucio Andrés Illanes Albornoz (arab, vxp) 7b01b5
		postp_strip_files ${PREFIX_MINIPIX}/bin;
Lucio Andrés Illanes Albornoz (arab, vxp) 59765f
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 59765f
};
Lucio Andrés Illanes Albornoz (arab, vxp) 7a180c
Lucio Andrés Illanes Albornoz (arab, vxp) 7a180c
# vim:filetype=sh