aboutsummaryrefslogtreecommitdiff
path: root/lib/cpt.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cpt.in')
-rw-r--r--lib/cpt.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cpt.in b/lib/cpt.in
index a80a961..995fa5e 100644
--- a/lib/cpt.in
+++ b/lib/cpt.in
@@ -77,7 +77,7 @@ _readlinkf() {
# Set the library directory if unset, assuming that it shares the same
# prefix with the tool.
- [ "$CPT_LIBDIR" ] || CPT_LIBDIR=$(_readlinkf "${0%/*}/../lib/cpt/")
+ [ "$CPT_LIBDIR" ] || CPT_LIBDIR=$(_readlinkf "$(command -v cpt-lib)") CPT_LIBDIR=${CPT_LIBDIR%/*}
# If a parser definition exists, let's run it ourselves. This makes sure we
# get the variables as soon as possible.