From 3ab8b4bb2c0c3c1a10fa10f3efa02586eaa0091f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 14 Jul 2021 10:22:28 +0300 Subject: [PATCH] kiss: simplify pkg_install_files --- kiss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kiss b/kiss index 87c7097..1363750 100755 --- a/kiss +++ b/kiss @@ -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.