forked from prometheus-lua/Prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpanda.sh
More file actions
27 lines (21 loc) · 711 Bytes
/
panda.sh
File metadata and controls
27 lines (21 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
# Panda Obfuscator v1.3 - Unix wrapper
# Uses bundled ./bin/lua5.1 if present, otherwise falls back to system lua/luajit.
set -e
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ -x "$ROOT/bin/lua5.1" ]; then
exec "$ROOT/bin/lua5.1" "$ROOT/cli.lua" "$@"
fi
if command -v lua5.1 >/dev/null 2>&1; then
exec lua5.1 "$ROOT/cli.lua" "$@"
fi
if command -v lua >/dev/null 2>&1; then
exec lua "$ROOT/cli.lua" "$@"
fi
if command -v luajit >/dev/null 2>&1; then
exec luajit "$ROOT/cli.lua" "$@"
fi
echo "Lua interpreter not found. Install Lua 5.1 or LuaJIT:" >&2
echo " Debian/Ubuntu: sudo apt install lua5.1" >&2
echo " macOS (brew): brew install lua@5.1" >&2
exit 1