-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
60 lines (47 loc) · 1.5 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# Exit script on any error
set -e
# Function to check if a command is available
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Install Homebrew if it isn't installed
if ! command_exists brew; then
echo "Homebrew not found. Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "Found Homebrew. Using Homebrew."
fi
# Install exiftool
echo "Installing exiftool..."
brew install exiftool
# Install ollama
echo "Installing ollama..."
brew install --cask ollama
# Download and install the Llama 3.18b model
echo "Downloading Llama 3.18b model..."
ollama pull llama3.1
# Function to download and install the latest GitHub release
install_github_release() {
local repo=$1
local download_url=https://github.com/${repo}/releases/download/v0.3.1-beta/virin-xmp-toolkit.zip
local old_folder=/Users/$USER/Desktop/virin-xmp-toolkit.app
local new_location=/Users/$USER/Desktop/
if [ -d ${old_folder} ]; then
echo "Deleting old target folder..."
rm -rf ${old_folder}
fi
# Download the release zip
echo "Downloading latest release from ${repo}..."
curl -OL "$download_url"
# Unzip the downloaded file
echo "Unzipping release..."
unzip -o "virin-xmp-toolkit.zip" -d ${new_location}
# Clean up the zip file
rm "virin-xmp-toolkit.zip"
}
GITHUB_REPO="josh-voyles/virin-xmp-toolkit"
# Install the latest release from GitHub
install_github_release "$GITHUB_REPO"
# Finished
echo "Installation complete!"