File size: 2,109 Bytes
28dc120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash

# This script checks and installs all dependencies which are needed to run roop-unleashed. After that, it clones the repo.
# Execute this easily with /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/PJF16/roop-unleashed/master/installer/macOSinstaller.sh)

# Function to check if a command exists
command_exists() {
    command -v "$1" >/dev/null 2>&1
}

echo "Starting check and installation process of dependencies for roop-unleashed"

# Check if Homebrew is installed
if ! command_exists brew; then
    echo "Homebrew is not installed. Starting installation..."
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
    echo "Homebrew is already installed."
fi

# Update Homebrew
echo "Updating Homebrew..."
brew update

# Check if Python 3.11 is installed
if brew list --versions python@3.11 >/dev/null; then
    echo "Python 3.11 is already installed."
else
    echo "Python 3.11 is not installed. Installing it now..."
    brew install python@3.11
fi

# Check if python-tk@3.11 is installed
if brew list --versions python-tk@3.11 >/dev/null; then
    echo "python-tk@3.11 is already installed."
else
    echo "python-tk@3.11 is not installed. Installing it now..."
    brew install python-tk@3.11
fi

# Check if ffmpeg is installed
if command_exists ffmpeg; then
    echo "ffmpeg is already installed."
else
    echo "ffmpeg is not installed. Installing it now..."
    brew install ffmpeg
fi

# Check if git is installed
if command_exists git; then
    echo "git is already installed."
else
    echo "git is not installed. Installing it now..."
    brew install git
fi

# Clone the repository
REPO_URL="https://github.com/C0untFloyd/roop-unleashed.git"
REPO_NAME="roop-unleashed"

echo "Cloning the repository $REPO_URL..."
git clone $REPO_URL

# Check if the repository was cloned successfully
if [ -d "$REPO_NAME" ]; then
    echo "Repository cloned successfully. Changing into directory $REPO_NAME..."
    cd "$REPO_NAME"
else
    echo "Failed to clone the repository."
fi

echo "Check and installation process completed."