kiss: simplify etc removal check

This commit is contained in:
Dylan Araps 2021-07-17 18:17:39 +03:00
parent 0c687a0b2a
commit 571b137df0
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 1 additions and 2 deletions

3
kiss
View File

@ -1211,9 +1211,8 @@ pkg_remove_files() {
while read -r file; do
case $file in /etc/?*[!/])
sh256 "$KISS_ROOT/$file" >/dev/null
sum_old=$(grep -F "${hash:-null}" "$1")
[ "${hash:-null}" = "$sum_old" ] || {
grep -qF "${hash:-null}" "$1" || {
printf 'Skipping %s (modified)\n' "$file"
continue
}