update_hash_cache.sh (376B)
1# vim: set ts=4 sw=4 et: 2 3update_hash_cache() { 4 local cache="$XBPS_SRCDISTDIR/by_sha256" 5 local distfile curfile 6 mkdir -p "$cache" 7 find "$XBPS_SRCDISTDIR" -type f | grep -v by_sha256 | while read -r distfile; do 8 cksum=$($XBPS_DIGEST_CMD "$distfile") 9 curfile="${distfile##*/}" 10 ln -vf "$distfile" "${cache}/${cksum}_${curfile}" 11 done 12}