mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
* feat(macos): move the data folder from voice-control to hex * fix(macos): match Hex's folder precedence in SDK and scripts; re-create a missing compat symlink
23 lines
901 B
Shell
Executable file
23 lines
901 B
Shell
Executable file
#!/bin/sh
|
|
set -eu
|
|
|
|
# Match Hex: an unmigrated voice-control folder (not its symlink to hex) stays in use.
|
|
support="$HOME/Library/Application Support/voice-control"
|
|
if [ ! -e "$support" ] || [ "$(readlink "$support" 2>/dev/null)" = hex ]; then
|
|
support="$HOME/Library/Application Support/hex"
|
|
fi
|
|
model_dir="$support/models"
|
|
model="$model_dir/parakeet-unified-en-0.6b-Q8_0.gguf"
|
|
partial="$model.partial"
|
|
revision="7e948f21b7bdbac698d3318db9d350f1096f3b6c"
|
|
sha256="4b50b6dd862bf6e346929aaf4f5eaacec003bfa3f56462d6c874b41ef2f38795"
|
|
|
|
mkdir -p "$model_dir"
|
|
if [ -f "$model" ] && echo "$sha256 $model" | shasum -a 256 -c - >/dev/null 2>&1; then
|
|
exit 0
|
|
fi
|
|
curl -fL --retry 3 --continue-at - \
|
|
"https://huggingface.co/handy-computer/parakeet-unified-en-0.6b-gguf/resolve/$revision/parakeet-unified-en-0.6b-Q8_0.gguf" \
|
|
-o "$partial"
|
|
echo "$sha256 $partial" | shasum -a 256 -c -
|
|
mv "$partial" "$model"
|