commit 5c27ea9a9378322ba4142f59a7dfad7869e087ad
parent b57fcc958856de171e445a8b91176191406b3b83
Author: Cem Keylan <cem@ckyln.com>
Date: Thu, 14 May 2020 01:53:30 +0300
kiss: use set on find for POSIX compliance, thanks @illiliti
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git 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