-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·32 lines (27 loc) · 1.88 KB
/
Copy pathrun.sh
File metadata and controls
executable file
·32 lines (27 loc) · 1.88 KB
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
28
29
30
31
32
#!/usr/bin/env bash
set -euo pipefail
# ─────────────────────────────────────────────────────────────────────
# OpenNarrator — one-command launch
# ─────────────────────────────────────────────────────────────────────
# Usage: bash run.sh # launch web UI on :8080
# bash run.sh --port 9090 # custom port
# bash run.sh --cli ... # pass args to CLI instead
# ─────────────────────────────────────────────────────────────────────
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT=".venv/bin/opennarrator"
# ── Auto-install ─────────────────────────────────────────────────────
if [ ! -f "$REPO_DIR/$SCRIPT" ]; then
echo "⚙️ First-time setup — installing..."
bash "$REPO_DIR/install.sh"
echo ""
fi
# ── Check ffmpeg ────────────────────────────────────────────────────
if ! command -v ffmpeg &>/dev/null; then
echo "ℹ️ Install ffmpeg for audio processing:"
echo " macOS: brew install ffmpeg"
echo " Linux: sudo apt install ffmpeg"
echo ""
fi
# ── Launch ───────────────────────────────────────────────────────────
# Run opennarrator with all args (no args = launch web UI by default)
exec "$REPO_DIR/$SCRIPT" "$@"