aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-05-13 22:53:29 +0000
committermerakor <cem@ckyln.com>2020-05-13 22:53:29 +0000
commitde0a5009666ca352b7d4f314a3c0f897a05cf0e5 (patch)
tree9509eb68bb5565a1f8dc2ee68b4421e533c07d92 /kiss
parentc68dffa6c42334cfa939fb21a5430a35abff08c0 (diff)
downloadcpt-de0a5009666ca352b7d4f314a3c0f897a05cf0e5.tar.gz
kiss: use set on find for POSIX compliance, thanks @illiliti
FossilOrigin-Name: 0127cec2199ab8482a676e8c8cde6732a07fd4d1ab82e0259a73589d9f488d81
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss7
1 files changed, 5 insertions, 2 deletions
diff --git a/kiss b/kiss
index 258a1cf..b79a56a 100755
--- a/kiss
+++ b/kiss
@@ -348,8 +348,11 @@ pkg_extract() {
#
# Skip the file if it has the same name as the directory.
# We will deal with it later.
- find . \( ! -name . -prune \) \
- ! -name "$dir" -exec mv {} .. +
+ #
+ # Word splitting is intentional here.
+ # shellcheck disable=2046
+ set -- $(find . \( ! -name . -prune \) ! -name "$dir")
+ mv -f "$@" ..
# If a file/directory with the same name as the directory
# exists, append a '.kissbak' to it and move it to the