From c2f90e93b00edfcf70b4c24985586853b39b8087 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 17 Jul 2021 11:19:08 +0300 Subject: [PATCH] kiss: remove . from find output using find --- kiss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kiss b/kiss index 3ac6858..4226b56 100755 --- a/kiss +++ b/kiss @@ -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" }