From 581e1d1930526aff4cd33e877beee2f3f7f69d87 Mon Sep 17 00:00:00 2001 From: merakor Date: Tue, 15 Feb 2022 01:54:24 +0000 Subject: pkg_manifest(): simplify sed call FossilOrigin-Name: dda7cbf21bc9cd7a9b4a82cae21d978619ba2e19f3cf36ef36cca0cd0cec1496 --- src/cpt-lib.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 23a75ec..3a57d00 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -1033,7 +1033,7 @@ pkg_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;/^\.\/$/d;ss.ss' > "${2:-$pkg_dir}/$1/$pkg_db/$1/manifest" + sort -r | sed '/^\.\/*$/d;ss.ss' > "${2:-$pkg_dir}/$1/$pkg_db/$1/manifest" ) pkg_etcsums() ( -- cgit v1.2.3