kiss: fix handling of /etc. closes #175

This commit is contained in:
Dylan Araps 2020-08-20 15:15:16 +03:00
parent 6e26703abb
commit 18c79222b8
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 5 additions and 3 deletions

8
kiss
View File

@ -1004,11 +1004,13 @@ pkg_remove_files() {
pkg_etc() (
[ -d "$tar_dir/$pkg_name/etc" ] || return 0
# Create all directories beforehand.
cd "$KISS_ROOT/"
find etc -type d -exec mkdir -p {} +
cd "$tar_dir/$pkg_name"
# Create all directories beforehand.
find etc -type d | while read -r dir; do
mkdir -p "$KISS_ROOT/$dir"
done
# Handle files in /etc/ based on a 3-way checksum check.
find etc ! -type d | sort | while read -r file; do
i=$((i + 1))