diff options
-rwxr-xr-x | kiss | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -508,9 +508,10 @@ pkg_manifest() ( # find: Print all files and directories and append '/' to directories. # sort: Sort the output in *reverse*. Directories appear *after* their # contents. - # sed: Remove the first character in each line (./dir -> /dir). - find . -mindepth 1 -type d -exec printf '%s/\n' {} + -or -print | - sort -r | sed ss.ss > "$pkg_dir/$1/$pkg_db/$1/manifest" + # 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 | sed '/^\.\/$/d;ss.ss' > "$pkg_dir/$1/$pkg_db/$1/manifest" ) pkg_tar() { |