mirror of
https://github.com/ollama/ollama.git
synced 2026-03-09 03:12:11 -05:00
install: prevent partial download script execution (#14311)
Wrap script in main function so that a truncated partial download doesn't end up executing half a script.
This commit is contained in:
@@ -2,6 +2,10 @@
|
|||||||
# This script installs Ollama on Linux and macOS.
|
# This script installs Ollama on Linux and macOS.
|
||||||
# It detects the current operating system architecture and installs the appropriate version of Ollama.
|
# It detects the current operating system architecture and installs the appropriate version of Ollama.
|
||||||
|
|
||||||
|
# Wrap script in main function so that a truncated partial download doesn't end
|
||||||
|
# up executing half a script.
|
||||||
|
main() {
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
red="$( (/usr/bin/tput bold || :; /usr/bin/tput setaf 1 || :) 2>&-)"
|
red="$( (/usr/bin/tput bold || :; /usr/bin/tput setaf 1 || :) 2>&-)"
|
||||||
@@ -446,3 +450,6 @@ fi
|
|||||||
|
|
||||||
status "NVIDIA GPU ready."
|
status "NVIDIA GPU ready."
|
||||||
install_success
|
install_success
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
||||||
|
|||||||
Reference in New Issue
Block a user