From 65f553e05323d6a6b5bdf41b1ae72c8d312777e8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 17 Jul 2021 07:43:15 +0300 Subject: [PATCH] misc: nit --- kiss | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/kiss b/kiss index 0768a80..396e2b3 100755 --- a/kiss +++ b/kiss @@ -443,7 +443,7 @@ pkg_extract() { mkcd "$mak_dir/$1/$dest" esac - case $_res in + case $_res in '') ;; git+*) # Split the source into URL + OBJECT (branch or commit). url=${_res##git+} com=${url##*[@#]} com=${com#${url%[#@]*}} @@ -466,10 +466,6 @@ pkg_extract() { unzip "$_res" ;; - '') - # Blank lines / Comments. - ;; - *) cp -Rf "$_res" . ;; @@ -659,11 +655,9 @@ pkg_manifest() { cd "${2:-$pkg_dir}/$1" - # find: Print all files and directories and append '/' to directories. - { - find . -type d -exec printf '%s/\n' {} + - find . ! -type d -print - } | + # Create a list of all files and directories. Append '/' to the end of + # directories so they can be easily filtered out later. + find . -type d -exec printf '%s/\n' {} + -o ! -type d -print | # sort: Sort the output in *reverse*. Directories appear *after* their # contents.