diff options
author | merakor <cem@ckyln.com> | 2020-05-13 22:53:29 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-05-13 22:53:29 +0000 |
commit | de0a5009666ca352b7d4f314a3c0f897a05cf0e5 (patch) | |
tree | 9509eb68bb5565a1f8dc2ee68b4421e533c07d92 /kiss | |
parent | c68dffa6c42334cfa939fb21a5430a35abff08c0 (diff) | |
download | cpt-de0a5009666ca352b7d4f314a3c0f897a05cf0e5.tar.gz |
kiss: use set on find for POSIX compliance, thanks @illiliti
FossilOrigin-Name: 0127cec2199ab8482a676e8c8cde6732a07fd4d1ab82e0259a73589d9f488d81
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |