cpt

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

commit 68cf91a9d225299769d2156c39d95af75c05e68d
parent 69471ec52b555cc66ea25c5ced7d22d8921befb8
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Wed, 31 Jul 2019 17:52:14 +0300

kiss: Make owns follow symlinks.

Diffstat:
Mkiss | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/kiss b/kiss @@ -958,10 +958,15 @@ args() { [ "$1" ] || die "'kiss owns' requires an argument." for file; do - [ -f "$KISS_ROOT/$file" ] || die "File '$file' doesn't exist." + # Strip 'KISS_ROOT' from the file path if passed and + # follow symlinks. + file=$(realpath "$KISS_ROOT/${file##$KISS_ROOT}") + + [ -f "$file" ] || die "File '$file' doesn't exist." set +f - pkg_owns=$(grep -lFx "$file" "$KISS_ROOT/$pkg_db/"*/manifest) + pkg_owns=$(grep -lFx "${file##$KISS_ROOT}" \ + "$KISS_ROOT/$pkg_db/"*/manifest) set -f pkg_owns=${pkg_owns%/*}