Took out the manpage parts.

This commit is contained in:
sealad886 2025-01-27 09:49:43 +00:00
parent 78515593d5
commit 7e4b330e98
1 changed files with 0 additions and 40 deletions

View File

@ -1,43 +1,3 @@
install_ollama_manpage() {
local manpage_source="${0:A:h}/ollama.1" # Path to the manpage in the plugin directory
local manpage_target_dir
local manpage_target
# Determine the appropriate man directory based on the operating system
case "$(uname)" in
Linux|Darwin)
manpage_target_dir="/usr/local/share/man/man1"
;;
*)
echo "Unsupported OS: $(uname). Manpage installation skipped."
return
;;
esac
manpage_target="${manpage_target_dir}/ollama.1"
# Check if the manpage already exists
if [[ -f "$manpage_target" ]]; then
# silently stop if the manpage entry already exists
return
fi
# Manpage does not exist; proceed with installation
if [[ -f "$manpage_source" ]]; then
# Ensure the target directory exists
if [[ ! -d "$manpage_target_dir" ]]; then
sudo mkdir -p "$manpage_target_dir"
fi
# Copy the manpage to the target directory
sudo cp "$manpage_source" "$manpage_target"
else
echo "Manpage source file not found: $manpage_source"
fi
}
# Call the function to install the manpage
install_ollama_manpage
# Function to retrieve available models for completion
_ollama_get_models() {
# Execute 'ollama list' and capture its output, suppressing any error messages