summaryrefslogtreecommitdiffhomepage
path: root/vars/dist_digest.subr
blob: 1b98fb6d0456ec1c74f5ec3ef9d6ef83f66e7440 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#
# set -o errexit -o noglob are assumed.
#

dist_digest_all() {
	local __;
	if [ "${ARG_TARBALL:-0}" -eq 1 ]; then
		log_msg info "Compiling SHA256 sums...";
		if [ -e "${PREFIX}/SHA256SUMS" ]; then
			build_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");
	fi;
};

# vim:filetype=sh