kiss: simplify pkg_install_files

This commit is contained in:
Dylan Araps 2021-07-14 10:22:28 +03:00
parent 759e4fb868
commit 3ab8b4bb2c
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 2 additions and 3 deletions

5
kiss
View File

@ -1082,7 +1082,7 @@ file_rwx() {
pkg_install_files() {
while read -r file; do
_file=$KISS_ROOT/${file#/}
_file=$KISS_ROOT$file
# Copy files and create directories (preserving permissions),
# skipping anything located in /etc/.
@ -1105,8 +1105,7 @@ pkg_install_files() {
[ -d "$_file" ] || test "$1" "$_file" || {
# Construct a temporary filename which is a) unique and
# b) identifiable as related to the package manager.
__tmp=$KISS_ROOT$file
__tmp=${__tmp%/*}/__kiss-tmp-$pkg_name-${file##*/}-$pid
__tmp=${_file%/*}/__kiss-tmp-$pkg_name-${file##*/}-$pid
# Copy the file to the destination directory with the
# temporary name created above.