aboutsummaryrefslogtreecommitdiff
path: root/contrib/cpt-owns
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cpt-owns')
-rwxr-xr-xcontrib/cpt-owns12
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.