From 51a101f96ebbd252b18c10bd7936f9db28604107 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 14 Jul 2021 11:12:36 +0300 Subject: [PATCH] kiss: move tests to if block --- kiss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kiss b/kiss index 84660a6..f9dd75e 100755 --- a/kiss +++ b/kiss @@ -1100,11 +1100,12 @@ pkg_install_files() { ;; *) - # Skip directories as they're likely symlinks in this case. - # Pure directories in manifests have a suffix of '/'. - [ -d "$_file" ] || test "$1" "$_file" || + if [ -d "$_file" ] || test "$1" "$_file"; then + # Skip directories as they're likely symlinks in this case. + # Pure directories in manifests have a suffix of '/'. + continue - if [ -h "$_file" ]; then + elif [ -h "$_file" ]; then # Copy the file to the destination directory overwriting # any existing file. cp -fP "$2$file" "${_file%/*}/."