From 5a325f329863eb32c04e6133258cf865f42b9baa Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: Feb 06 2017 00:23:34 +0000 Subject: build.sh, subr/post_sha256sums.subr: compile ${PREFIX}/SHA256SUMS over eXecutable files in ${PREFIX_NATIVE}/{bin,lib} (via midipix.) --- diff --git a/build.sh b/build.sh index 8511e7b..8a057c5 100755 --- a/build.sh +++ b/build.sh @@ -109,7 +109,7 @@ for BUILD_TARGET_LC in $(subst_tgts invariants ${BUILD_TARGETS_META:-world}); do fi; done; if [ "${BUILD_SCRIPT_RC:-0}" -eq 0 ]; then - post_copy_etc; post_strip; post_tarballs; + post_copy_etc; post_strip; post_tarballs; post_sha256sums; fi; post_build_files; log_msg info "${BUILD_NFINI} finished, ${BUILD_NSKIP} skipped, and ${BUILD_NFAIL} failed builds in ${BUILD_NBUILT} build script(s)."; diff --git a/subr/post_sha256sums.subr b/subr/post_sha256sums.subr new file mode 100644 index 0000000..befd2d1 --- /dev/null +++ b/subr/post_sha256sums.subr @@ -0,0 +1,16 @@ +# +# set -o errexit -o noglob are assumed. +# + +post_sha256sums() { + local __; + log_msg info "Compiling SHA256 sums..."; + if [ -e "${PREFIX}/SHA256SUMS" ]; then + build_fileop mv "${PREFIX}/SHA256SUMS" "${PREFIX}/SHA256SUMS.last"; + fi; + for __ in $(find "${PREFIX_NATIVE}" -type f -perm +011 -name bin/\* lib/\*); do + sha256sum "${__}"; + done > "${PREFIX}/SHA256SUMS"; +}; + +# vim:filetype=sh