kiss: Set permissions for all non dirs

This commit is contained in:
Dylan Araps 2020-04-22 13:50:02 +03:00
parent c542169997
commit 57e27f73cc
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

7
kiss
View File

@ -842,6 +842,13 @@ pkg_install_files() {
# KISS' method to avoid the whole fakeroot mess.
chown -h root:root "$line"
# Preserve permissions by using chmod. This runs after
# chown as chown will reset suid/guid when ownership changes.
#
# This only runs on non-directories as we desire the reset
# behavior mentioned above.
[ -d "$line" ] || chmod "$perms" "$line"
printf '%s %s (%s)\e[K\r' "$3" "$i/$man_tot" "$line"
done