File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,21 @@ function update_script() {
2727 msg_error " No ${APP} Installation Found!"
2828 exit
2929 fi
30+
31+ OLLAMA_VERSION=$( ollama -v | awk ' {print $NF}' )
32+ if [ -n " $OLLAMA_VERSION " ]; then
33+ RELEASE=$( curl -s https://api.github.com/repos/ollama/ollama/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
34+ if [ " $OLLAMA_VERSION " != " $RELEASE " ]; then
35+ msg_info " Updating Ollama"
36+ curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz
37+ tar -C /usr -xzf ollama-linux-amd64.tgz
38+ rm -rf ollama-linux-amd64.tgz
39+ msg_ok " Ollama updated to version $RELEASE "
40+ else
41+ msg_ok " Ollama is already up to date."
42+ fi
43+ fi
44+
3045 msg_info " Updating ${APP} (Patience)"
3146 cd /opt/open-webui
3247 mkdir -p /opt/open-webui-backup
You can’t perform that action at this time.
0 commit comments