1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-25 16:40:07 -07:00

kiss: Fix broken installation.

This commit is contained in:
Dylan Araps 2019-07-22 10:23:43 +03:00
parent dc44ee51e7
commit 800c4a2a75

6
kiss
View File

@ -695,18 +695,18 @@ pkg_install() {
# Install the package by using 'rsync' and overwrite any existing files # Install the package by using 'rsync' and overwrite any existing files
# (excluding '/etc/'). # (excluding '/etc/').
rsync -Kav --exclude etc -- "$tar_dir/" "$KISS_ROOT/" rsync -HKav --exclude etc -- "$tar_dir/" "$KISS_ROOT/"
# If '/etc/' exists in the package, install it but don't overwrite. # If '/etc/' exists in the package, install it but don't overwrite.
[ -d "$tar_dir/etc" ] && [ -d "$tar_dir/etc" ] &&
rsync -Kav --ignore-existing "$tar_dir/etc" "$KISS_ROOT/" rsync -HKav --ignore-existing "$tar_dir/etc" "$KISS_ROOT/"
# Remove any leftover files if this is an upgrade. # Remove any leftover files if this is an upgrade.
[ -f "$cac_dir/m-$pkg_name" ] && [ -f "$cac_dir/m-$pkg_name" ] &&
awk 'NR==FNR{lines[$0];next}!($0 in lines)' \ awk 'NR==FNR{lines[$0];next}!($0 in lines)' \
"$KISS_ROOT/$pkg_db/$pkg_name/manifest" "$cac_dir/m-$pkg_name" | "$KISS_ROOT/$pkg_db/$pkg_name/manifest" "$cac_dir/m-$pkg_name" |
while read -r file; do while read -r file; do
rm -f "$KISS_ROOT/$file" [ -f "$KISS_ROOT/$file" ] && rm -f "$KISS_ROOT/$file"
done done
# Reset 'trap' to its original value. Installation is done so # Reset 'trap' to its original value. Installation is done so