From 363fcaf71ca513e4bde9a23603944cd3ff260136 Mon Sep 17 00:00:00 2001 From: illiliti Date: Mon, 20 Jun 2022 12:51:57 +0300 Subject: [PATCH] kiss: copy symlinks as is If source contains dangling symlink, attempt to dereference it would result into error. --- kiss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kiss b/kiss index e264f7c..084899b 100755 --- a/kiss +++ b/kiss @@ -496,7 +496,7 @@ pkg_source_tar() { -exec sh -c 'mv -f "$0" "$@" .' {} + 2>/dev/null || find "$KISS_PID-$dir/." ! -name . -prune \ - -exec sh -c 'cp -fRp "$0" "$@" .' {} + + -exec sh -c 'cp -fRPp "$0" "$@" .' {} + # Remove the directory now that all files have been # transferred out of it. This can't be a simple 'rmdir' @@ -528,7 +528,7 @@ pkg_extract() { case $_res in git+*) - cp -LRf "$_des/." . + cp -PRf "$_des/." . ;; *.tar|*.tar.??|*.tar.???|*.tar.????|*.t?z) @@ -536,7 +536,7 @@ pkg_extract() { ;; *?*) - cp -LRf "$_res" . + cp -PRf "$_res" . ;; esac done < "$repo_dir/sources" || die "$1" "Failed to extract $_res"