kiss: move tests to if block

This commit is contained in:
Dylan Araps 2021-07-14 11:12:36 +03:00
parent b5fba97ec8
commit 51a101f96e
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 5 additions and 4 deletions

9
kiss
View File

@ -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%/*}/."