fix: launch trainer from extracted archive

This commit is contained in:
2026-08-14 05:12:47 -05:00
parent aab9ce0fe7
commit 3a568d150b
6 changed files with 26 additions and 10 deletions
+6 -1
View File
@@ -1,7 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
trainer_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ -f "$script_dir/scripts/jrich-wakeword-trainer" ]]; then
trainer_root="$script_dir"
else
trainer_root="$(cd "$script_dir/.." && pwd)"
fi
if ! command -v python3 >/dev/null 2>&1; then
echo "Python 3.11 or newer is required. Install it, then run this file again." >&2