From 380da113eb0c67e597871448eb7fcb69b1b00e23 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 29 Jul 2020 17:16:15 +0300 Subject: [PATCH] kiss: Make pkg_remove_files a little clearer --- kiss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kiss b/kiss index 453f74e..dee28ed 100755 --- a/kiss +++ b/kiss @@ -952,12 +952,12 @@ pkg_remove_files() { # Remove a file list from the system. This function runs during package # installation and package removal. Combining the removals in these two # functions allows us to stop duplicating code. - while read -r file; do file=$KISS_ROOT/$file - # Skip files in /etc/. - if [ -z "${file##"$KISS_ROOT/etc/"*}" ]; then : + while read -r file; do + case $file in /etc/*) continue; esac + file=$KISS_ROOT/$file # Remove files. - elif [ -f "$file" ] && [ ! -h "$file" ]; then + if [ -f "$file" ] && [ ! -h "$file" ]; then rm -f "$file" # Remove file symlinks.