mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-19 23:48:06 +00:00
Fix Ollama update logic (#3506)
This commit is contained in:
parent
92c6662abf
commit
6fd77dcd9f
@ -28,11 +28,11 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OLLAMA_VERSION=$(ollama -v | awk '{print $NF}')
|
if [ -x "/usr/bin/ollama" ]; then
|
||||||
if [ -n "$OLLAMA_VERSION" ]; then
|
msg_info "Updating Ollama"
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
OLLAMA_VERSION=$(ollama -v | awk '{print $NF}')
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}')
|
||||||
if [ "$OLLAMA_VERSION" != "$RELEASE" ]; then
|
if [ "$OLLAMA_VERSION" != "$RELEASE" ]; then
|
||||||
msg_info "Updating Ollama"
|
|
||||||
curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz
|
curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz
|
||||||
tar -C /usr -xzf ollama-linux-amd64.tgz
|
tar -C /usr -xzf ollama-linux-amd64.tgz
|
||||||
rm -rf ollama-linux-amd64.tgz
|
rm -rf ollama-linux-amd64.tgz
|
||||||
|
Loading…
x
Reference in New Issue
Block a user