diff options
author | merakor <cem@ckyln.com> | 2020-07-24 10:39:50 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-07-24 10:39:50 +0000 |
commit | db779acfe1319f7cdbdc0c493f6e6fd6ae2412ef (patch) | |
tree | 9740efa1e1007c9e522e3d4c3b633b8fa4e85183 /contrib/cpt-owns | |
parent | 1deb9398fa1d646995348bd92406580627dbaed7 (diff) | |
download | cpt-db779acfe1319f7cdbdc0c493f6e6fd6ae2412ef.tar.gz |
contrib: replace kiss usage with cpt tools
FossilOrigin-Name: 37f8991b3fe9af32f167b813e0a1a30ada525aa3e3f31507a267c7c3ba5f43b7
Diffstat (limited to 'contrib/cpt-owns')
-rwxr-xr-x | contrib/cpt-owns | 12 |
1 files changed, 6 insertions, 6 deletions
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. |