diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-01-28 21:38:54 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-01-28 21:38:54 +0000 |
commit | ea25126b1dcc403ca1b7c4ecdd2ebd4ac8156b26 (patch) | |
tree | 97ffa9dc04a89d66301996ec3e43a25e73a6044b | |
parent | 1077fce13388d4672a44a8fa4a000960cf6fb619 (diff) | |
download | cpt-ea25126b1dcc403ca1b7c4ecdd2ebd4ac8156b26.tar.gz |
kiss: Full posix find usage. Closes #95
FossilOrigin-Name: 1ae73c1603a4fd7812fbd5b143cb16e8bd2ee5ea8be8ff3291fb5ace1ad163d4
-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() { |