File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ function update_script() {
2828 exit
2929 fi
3030
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) }' )
31+ if [ -x " /usr/bin/ollama" ]; then
32+ msg_info " Updating Ollama"
33+ OLLAMA_VERSION=$( ollama -v | awk ' {print $NF}' )
34+ RELEASE=$( curl -s https://api.github.com/repos/ollama/ollama/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4)}' )
3435 if [ " $OLLAMA_VERSION " != " $RELEASE " ]; then
35- msg_info " Updating Ollama"
3636 curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz
3737 tar -C /usr -xzf ollama-linux-amd64.tgz
3838 rm -rf ollama-linux-amd64.tgz
You can’t perform that action at this time.
0 commit comments