Conan_Kudo / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone
Blob Blame History Raw
#
# set -o errexit -o noglob are assumed.
#

pkg_invariants_digest_all() {
	local _fname="";
	if ex_rtl_lmatch "${ARG_DIST}" , tbz2	\
	|| ex_rtl_lmatch "${ARG_DIST}" , tgz	\
	|| ex_rtl_lmatch "${ARG_DIST}" , txz; then
		ex_rtl_log_msg info "Compiling SHA256 sums...";
		if [ -e "${PREFIX}/SHA256SUMS" ]; then
			ex_rtl_fileop mv "${PREFIX}/SHA256SUMS" "${PREFIX}/SHA256SUMS.last";
		fi;
		(cd "${PREFIX}";
		for _fname in $(find "${PREFIX_NATIVE#${PREFIX}/}" -type f -perm /a=x	\
				\( -path "${PREFIX_NATIVE#${PREFIX}/}/bin/*" -or	\
				   -path "${PREFIX_NATIVE#${PREFIX}/}/lib/*" \)); do
			sha256sum "${_fname}";
		done > "${PREFIX}/SHA256SUMS");
	fi;
};

# vim:filetype=sh