buddi-asr-source-code / scripts /build_pi_runtime.sh
Hussein
Claude Opus 5 (1M context)
Record the executable bit on the shell scripts
888abae
Raw History Blame Contribute Delete
780 Bytes
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -ne 1 ]]; then
echo "usage: $0 /explicit/new/path/for/whisper.cpp" >&2
exit 2
fi
target_path="$1"
runtime_ref="${WHISPER_CPP_REF:-v1.9.2}"
if [[ "$target_path" != /* || "$target_path" == "/" ]]; then
echo "error: target must be an explicit absolute path other than /" >&2
exit 2
fi
if [[ -e "$target_path" ]]; then
echo "error: target already exists; refusing to alter it: $target_path" >&2
exit 2
fi
git clone --branch "$runtime_ref" --depth 1 \
https://github.com/ggml-org/whisper.cpp.git "$target_path"
cmake -S "$target_path" -B "$target_path/build" \
-DCMAKE_BUILD_TYPE=Release \
-DGGML_BLAS=1
cmake --build "$target_path/build" -j 4 --config Release
echo "built whisper.cpp $runtime_ref at $target_path"