-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstaller_macos.sh
35 lines (29 loc) · 1.37 KB
/
installer_macos.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
# This is a script to install the ESPMega Lightshow program on macOS
# If Homebrew is not installed, install it
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)"
else
echo "Homebrew is already installed. Updating Homebrew..."
brew update
fi
# Install dependencies
echo "Installing dependencies..."
brew install [email protected]
# Reload environment variables
echo "Reloading environment variables..."
source ~/.bash_profile
# Install Python dependencies
echo "Installing Python dependencies..."
pip3 install espmega_lightshow[homeassistant]
# Create program data directory in home directory
echo "Creating program data directory..."
mkdir -p ~/.espmega_lightshow
# Create shortcut to start program
echo "Creating desktop shortcut to start program..."
# Create debug shortcut (with console), use ~/.espmega_lightshow as working directory
echo "cd ~/.espmega_lightshow && python -m espmega_lightshow > ~/Desktop/ESPMega\ Lightshow\ \(Debug\).command"
chmod +x ~/Desktop/ESPMega\ Lightshow\ \(Debug\).command
# Create main shortcut (without console), use ~/.espmega_lightshow as working directory
echo "cd ~/.espmega_lightshow && python -m espmega_lightshow > ~/Desktop/ESPMega\ Lightshow.command"
chmod +x ~/Desktop/ESPMega\ Lightshow.command