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

pkg_invariants_digest_all() {
	local __="";
	if [ -z "${ARG_TARBALL}" ]; then
		exit 0;
	else
		ex_rtl_log_msg info "Compiling SHA256 sums...";
	fi;
	if [ -e "${PREFIX}/SHA256SUMS" ]; then
		ex_rtl_fileop mv "${PREFIX}/SHA256SUMS" "${PREFIX}/SHA256SUMS.last";
	fi;
	(cd "${PREFIX}";
	for __ in $(find "${PREFIX_NATIVE#${PREFIX}/}" -type f -perm /a=x	\
			\( -path "${PREFIX_NATIVE#${PREFIX}/}/bin/*" -or	\
			   -path "${PREFIX_NATIVE#${PREFIX}/}/lib/*" \)); do
		sha256sum "${__}";
	done > "${PREFIX}/SHA256SUMS");
};

# vim:filetype=sh