Files
T
therealaleph 899ef06f4a v0.4.1: launcher scripts (run.sh / run.command / run.bat)
First run needs the CLI to install the MITM CA into the system trust
store (sudo/admin prompt), which the UI alone can't do reliably from a
double-click. Add a small launcher for each platform that runs the CLI
with --install-cert once, then starts the UI. Each release archive now
contains a run.* script alongside the binaries.
2026-04-21 22:17:25 +03:00

27 lines
660 B
Bash
Executable File

#!/bin/sh
# Double-clickable launcher for macOS Finder.
# Same as run.sh but with .command extension so Finder opens it in Terminal.
set -eu
DIR="$(cd "$(dirname "$0")" && pwd)"
CLI="$DIR/mhrv-rs"
UI="$DIR/mhrv-rs-ui"
if [ ! -x "$CLI" ]; then
echo "error: $CLI not found or not executable"
echo "Press return to close..."
read _
exit 1
fi
echo "Initializing MITM CA (you may be asked for your password)..."
"$CLI" --install-cert || echo "warning: CA install returned non-zero. The UI can still run."
if [ ! -x "$UI" ]; then
echo "UI binary not found. Starting CLI proxy instead."
exec "$CLI"
fi
echo "Starting mhrv-rs UI..."
"$UI"