Bläddra i källkod

Move pxpath bin path to variable

Build checks are the first customer.
Alois Mahdal 6 år sedan
förälder
incheckning
52d7b66edc
1 ändrade filer med 6 tillägg och 2 borttagningar
  1. 6
    2
      src/pxpath.sh.skel

+ 6
- 2
src/pxpath.sh.skel Visa fil

@@ -12,7 +12,6 @@ shellfu import pretty
12 12
 # libxml2 and its Python bindings.
13 13
 #
14 14
 
15
-
16 15
 pxpath() {
17 16
     #
18 17
     # Run XPath query $1 on file $2, register namespaces $3..
@@ -63,7 +62,7 @@ pxpath() {
63 62
             }
64 63
     esac
65 64
     #shellcheck disable=SC2154
66
-    "__SHELLFU_LIBEXEC__"/pxpath \
65
+    "$_PXPATH__BIN" \
67 66
         "$query" "$file" "$@"; es=$?
68 67
     test -n "$tmp" && rm "$tmp"
69 68
     return $es
@@ -73,6 +72,11 @@ pxpath() {
73 72
 # INTERNAL # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
74 73
 #          #                                not even as XPath expression #
75 74
 
75
+#
76
+# Path to pxpath python script
77
+#
78
+_PXPATH__BIN=${_PXPATH__BIN:-__SHELLFU_LIBEXEC__/pxpath}
79
+
76 80
 __pxpath__usage() {
77 81
     #
78 82
     # Print usage message for function pxpath__$1