kiss: Swap to more portable shasum generation

This commit is contained in:
Dylan Araps 2020-04-30 17:17:41 +03:00
parent 62ee15db43
commit 3e4e38d002
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

6
kiss
View File

@ -474,7 +474,7 @@ pkg_etcsums() (
# prior directory before being able to continue. # prior directory before being able to continue.
cd "$pkg_dir/$1/etc" 2>/dev/null || return 0; cd .. cd "$pkg_dir/$1/etc" 2>/dev/null || return 0; cd ..
find etc -type f -exec sha256sum {} + > "$pkg_dir/$1/$pkg_db/$1/etcsums" find etc -type f -exec shasum -a 256 {} + > "$pkg_dir/$1/$pkg_db/$1/etcsums"
) )
pkg_tar() { pkg_tar() {
@ -662,9 +662,9 @@ pkg_checksums() {
die "$1" "Couldn't find source '$src'" die "$1" "Couldn't find source '$src'"
fi fi
# An easy way to get 'sha256sum' to print with the 'basename' # An easy way to get 'shasum' to print with the 'basename'
# of files is to 'cd' to the file's directory beforehand. # of files is to 'cd' to the file's directory beforehand.
(cd "$src_path" && sha256sum "${src##*/}") || (cd "$src_path" && shasum -a 256 "${src##*/}") ||
die "$1" "Failed to generate checksums" die "$1" "Failed to generate checksums"
done < "$(pkg_find "$1")/sources" done < "$(pkg_find "$1")/sources"
} }