kiss: remove . from find output using find

This commit is contained in:
Dylan Araps 2021-07-17 11:19:08 +03:00
parent 781808b9d6
commit c2f90e93b0
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 2 additions and 2 deletions

4
kiss
View File

@ -665,14 +665,14 @@ pkg_manifest() {
# Create a list of all files and directories. Append '/' to the end of
# directories so they can be easily filtered out later. Also filter out
# all libtool .la files and charset.alias.
find . -type d -exec printf '%s/\n' {} + \
find . ! -path . -type d -exec printf '%s/\n' {} + \
-o \( ! -type d -a ! -name \*.la -a ! -name charset.alias \) -print |
# sort: Sort the output in *reverse*. Directories appear *after* their
# contents.
# sed: Remove the first character in each line (./dir -> /dir) and
# remove all lines which only contain '.'.
sort -r | sed '/^\.\/$/d;ss.ss' > "$PWD/$pkg_db/$1/manifest"
sort -r | sed ss.ss > "$PWD/$pkg_db/$1/manifest"
cd "$OLDPWD"
}