aboutsummaryrefslogtreecommitdiff
path: root/libbutl/utility.bash.in
diff options
context:
space:
mode:
Diffstat (limited to 'libbutl/utility.bash.in')
-rw-r--r--libbutl/utility.bash.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/libbutl/utility.bash.in b/libbutl/utility.bash.in
index e284c55..1face1a 100644
--- a/libbutl/utility.bash.in
+++ b/libbutl/utility.bash.in
@@ -12,3 +12,15 @@ if (( BASH_VERSINFO[0] < 4 || BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 3 ));
echo 'error: bash 4.3 or later is required' 2>&1
exit 1
fi
+
+# Return the libbutl/ module directory.
+#
+# This is used to run the binding support executables.
+#
+function butl_path ()
+{
+ # BASH_SOURCE[0] contains the source path of the function being executed
+ # (that is, us).
+ #
+ dirname "${BASH_SOURCE[0]}"
+}