cpt

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

commit 6151613b0b4974171724c6ab9d990ccfbfd74c99
parent ab632329ab2e95177074b320a4a7163e0e402917
Author: Cem Keylan <cem@ckyln.com>
Date:   Sun, 19 Apr 2020 23:02:46 +0300

kiss: use '-x' and '-d' flags in pkg_find instead of '-e'

'-e' flag applies to everything that exists, which is not ideal.
This can, for example, also show README files on personal repositories.
Since our target is user-scripts and package directories, checking
if the target is executable is the best overall solutions as most
directories are also marked executable. This change makes sure we
get what we want while keeping other files out of pkg_find.

Diffstat:
Mkiss | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kiss b/kiss @@ -128,7 +128,7 @@ pkg_find() { set +f for path2 in "$path/"$query; do - [ -e "$path2" ] && set -f -- "$@" "$path2" + [ -x "$path2" ] || [ -d "$path2" ] && set -f -- "$@" "$path2" done done