fix: launch trainer from extracted archive
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user