kiss: Only run etcsums if /etc exists in package

This commit is contained in:
Dylan Araps 2020-02-05 11:16:51 +02:00
parent e8ead378d7
commit 0df093f729
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 2 additions and 2 deletions

4
kiss
View File

@ -428,7 +428,7 @@ pkg_etcsums() (
# This funcion runs as a sub-shell to avoid having to 'cd' back to the # This funcion runs as a sub-shell to avoid having to 'cd' back to the
# prior directory before being able to continue. # prior directory before being able to continue.
cd "$pkg_dir/$1/etc" 2>/dev/null || return; 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 sha256sum {} + > "$pkg_dir/$1/$pkg_db/$1/etcsums"
) )
@ -600,7 +600,7 @@ pkg_build() {
pkg_fixdeps "$pkg" pkg_fixdeps "$pkg"
pkg_junk "$pkg" pkg_junk "$pkg"
pkg_manifest "$pkg" pkg_manifest "$pkg"
pkg_etcsums "$pkg" ||: pkg_etcsums "$pkg"
pkg_tar "$pkg" pkg_tar "$pkg"
# Install only dependencies of passed packages. # Install only dependencies of passed packages.