From db779acfe1319f7cdbdc0c493f6e6fd6ae2412ef Mon Sep 17 00:00:00 2001 From: merakor Date: Fri, 24 Jul 2020 10:39:50 +0000 Subject: contrib: replace kiss usage with cpt tools FossilOrigin-Name: 37f8991b3fe9af32f167b813e0a1a30ada525aa3e3f31507a267c7c3ba5f43b7 --- contrib/cpt-owns | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'contrib/cpt-owns') diff --git a/contrib/cpt-owns b/contrib/cpt-owns index e14d579..60c4633 100755 --- a/contrib/cpt-owns +++ b/contrib/cpt-owns @@ -1,12 +1,12 @@ #!/bin/sh -e # Check which package owns a file -case "$1" in ''|--help|-h) printf '%s\n' "usage: kiss-owns [file]" ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '%s\n' "usage: ${0##*/} [file]" ; exit 0 ; esac -# Strip 'KISS_ROOT' from the file path if passed and +# Strip 'CPT_ROOT' from the file path if passed and # follow symlinks. -file="${1#$KISS_ROOT}" -dirname=$(kiss-readlink "$KISS_ROOT/${file%/*}") +file="${1#$CPT_ROOT}" +dirname=$(cpt-readlink "$CPT_ROOT/${file%/*}") file="$dirname/${file##*/}" # Check if the file exists and exit if it is not. @@ -19,8 +19,8 @@ file="$dirname/${file##*/}" # Print the full path to the manifest file which contains # the match to our search. -pkg_owns=$(grep -lFx "${file#$KISS_ROOT}" \ - "$KISS_ROOT/var/db/kiss/installed/"*/manifest) +pkg_owns=$(grep -lFx "${file#$CPT_ROOT}" \ + "$CPT_ROOT/var/db/cpt/installed/"*/manifest) # Extract the package name from the path above. -- cgit v1.2.3