diff options
Diffstat (limited to 'vars/invariants_digest.vars')
-rw-r--r-- | vars/invariants_digest.vars | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/vars/invariants_digest.vars b/vars/invariants_digest.vars index 51bc212b..38efb49f 100644 --- a/vars/invariants_digest.vars +++ b/vars/invariants_digest.vars @@ -3,21 +3,22 @@ # pkg_invariants_digest_all() { - local __=""; - if [ -z "${ARG_TARBALL}" ]; then - exit 0; - else + local _fname=""; + if ex_rtl_lmatch "${ARG_DIST}" , tbz2 \ + || ex_rtl_lmatch "${ARG_DIST}" , tgz \ + || ex_rtl_lmatch "${ARG_DIST}" , txz \ + || ex_rtl_lmatch "${ARG_DIST}" , zipdist; 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; - 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 |