-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal-setup-mac.sh
60 lines (52 loc) · 1.58 KB
/
local-setup-mac.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
# Function to check and install Homebrew on macOS
install_homebrew() {
if ! command -v brew &> /dev/null; then
echo "Homebrew is not installed. Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add Homebrew to PATH for Apple Silicon Macs
if [[ $(uname -m) == 'arm64' ]]; then
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
echo "Homebrew installation completed."
else
echo "Homebrew is already installed."
fi
}
install_homebrew
# Check if Python 3 is already installed
echo "Checking for Python installation"
if command -V python3 &> /dev/null; then
echo "Python 3 is already installed."
else
brew install python3
echo "Python 3 has been installed."
fi
sleep 1s
# Check for pip3
if command -V pip3 &> /dev/null; then
echo "pip3 is already installed."
else
brew install python3
echo "pip3 has been installed."
fi
# Verify the installation
echo "Python version:"
python3 --version
echo "pip version:"
pip3 --version
sleep 1s
# Check for ImageMagick
echo "Checking for ImageMagick binaries installation"
if command --version magick &> /dev/null; then
echo "ImageMagick is already installed"
else
brew install imagemagick
fi
sleep 1s
echo "Installing the dependencies for Stereo Format App"
pip3 install -r requirements.txt
sleep 1s
echo "Stereo Format setup is complete!"
echo "Please run \"python3 app.py\" to start the server on your machine"