kiss: Make pkg_remove_files a little clearer

This commit is contained in:
Dylan Araps 2020-07-29 17:16:15 +03:00
parent d883c42498
commit 380da113eb
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 4 additions and 4 deletions

8
kiss
View File

@ -952,12 +952,12 @@ pkg_remove_files() {
# Remove a file list from the system. This function runs during package # Remove a file list from the system. This function runs during package
# installation and package removal. Combining the removals in these two # installation and package removal. Combining the removals in these two
# functions allows us to stop duplicating code. # functions allows us to stop duplicating code.
while read -r file; do file=$KISS_ROOT/$file while read -r file; do
# Skip files in /etc/. case $file in /etc/*) continue; esac
if [ -z "${file##"$KISS_ROOT/etc/"*}" ]; then : file=$KISS_ROOT/$file
# Remove files. # Remove files.
elif [ -f "$file" ] && [ ! -h "$file" ]; then if [ -f "$file" ] && [ ! -h "$file" ]; then
rm -f "$file" rm -f "$file"
# Remove file symlinks. # Remove file symlinks.