cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 2e64975a5969b606bc0c658d1c7aaa84c8656e77
parent 1e4f9e89b2db56e61589139f84d504237fdfe8d9
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Tue, 28 Jan 2020 23:38:54 +0200

kiss: Full posix find usage. Closes #95

Diffstat:
Mkiss | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/kiss b/kiss @@ -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() {