kiss: fix UB around find

This commit is contained in:
Dylan Araps 2020-11-23 07:21:02 +02:00
parent 1ea02cc354
commit 6d205e8095
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 5 additions and 1 deletions

6
kiss
View File

@ -535,7 +535,11 @@ pkg_manifest() (
# contents.
# sed: Remove the first character in each line (./dir -> /dir) and
# remove all lines which only contain '.'.
find . -type d -exec printf '%s/\n' {} + -o -print | sort -r |
{
find . -type d -exec printf '%s/\n' {} +
find . ! -type d -print
} | sort -r |
sed '/^\.\/$/d;ss.ss' > "${2:-$pkg_dir}/$1/$pkg_db/$1/manifest"
)