We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fdb83e3 + 3caf431 commit f653b59Copy full SHA for f653b59
1 file changed
prometheus-lua
@@ -1,7 +1,15 @@
1
#!/usr/bin/env sh
2
set -eu
3
4
-SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
+SCRIPT_PATH="$0"
5
+while [ -L "$SCRIPT_PATH" ]; do
6
+ LINK_TARGET="$(readlink "$SCRIPT_PATH")"
7
+ case "$LINK_TARGET" in
8
+ /*) SCRIPT_PATH="$LINK_TARGET" ;;
9
+ *) SCRIPT_PATH="$(dirname "$SCRIPT_PATH")/$LINK_TARGET" ;;
10
+ esac
11
+done
12
+SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$SCRIPT_PATH")" && pwd)
13
BUNDLED_LUA="$SCRIPT_DIR/runtime/lua"
14
15
: "${PROMETHEUS_LUA_VERSION:=dev}"
0 commit comments