Files
wehub-resource-sync 7254f7b4d1
Build / Build (macos-latest) (push) Has been cancelled
Build / Build (ubuntu-latest) (push) Has been cancelled
Build / Build (windows-latest) (push) Has been cancelled
Build / Analyze (javascript) (push) Has been cancelled
Build / Analyze (python) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:37:45 +08:00

37 lines
796 B
Bash
Executable File

#!/bin/bash
set -e
pushd $(cd $(dirname ${0})/..; pwd) > /dev/null
src_dir="./third_party/source/llama.cpp"
clean() {
echo "ggml clean"
rm -rf "${src_dir}"
}
sync() {
echo "ggml sync"
if [ ! -d "${src_dir}" ]; then
git clone --quiet --depth=1 --branch master --single-branch https://github.com/ggerganov/llama.cpp.git "${src_dir}"
else
git -C "${src_dir}" fetch --quiet --depth=1 origin master
git -C "${src_dir}" reset --quiet --hard FETCH_HEAD
git -C "${src_dir}" gc --quiet --prune=all
fi
}
metadata() {
echo "gguf metadata"
node ./tools/gguf-script.js
}
while [ "$#" != 0 ]; do
command="$1" && shift
case "${command}" in
"clean") clean;;
"sync") sync;;
"metadata") metadata;;
esac
done