-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-mac.command
More file actions
executable file
·49 lines (40 loc) · 1.67 KB
/
Copy pathinstall-mac.command
File metadata and controls
executable file
·49 lines (40 loc) · 1.67 KB
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
#!/bin/bash
# ==========================================================
# Gemini Discord Bot — One-click installer for macOS
# Double-click this file to set everything up.
# (First time: right-click -> Open -> Open, to get past the
# macOS security warning about unidentified developers.)
# ==========================================================
cd "$(dirname "$0")" || exit 1
echo "=========================================="
echo " Installing Gemini Discord Bot..."
echo "=========================================="
if command -v python3 >/dev/null 2>&1; then
PY=python3
elif command -v python >/dev/null 2>&1; then
PY=python
else
echo "❌ Python 3 is not installed."
echo " Install it from https://www.python.org/downloads/ and run this again."
read -r -p "Press Enter to close..."
exit 1
fi
echo "Creating a private virtual environment (.venv)..."
$PY -m venv .venv || { echo "❌ Could not create venv."; read -r -p "Press Enter to close..."; exit 1; }
# shellcheck disable=SC1091
source .venv/bin/activate
echo "Upgrading pip..."
python -m pip install --upgrade pip >/dev/null
echo "Installing required packages..."
pip install -r requirements.txt || { echo "❌ Package install failed."; read -r -p "Press Enter to close..."; exit 1; }
if [ ! -f .env ]; then
cp .env.example .env
echo ""
echo "📝 A config file named '.env' was created for you."
echo " Open it and paste your Discord bot token and Gemini API key."
fi
echo ""
echo "✅ Install complete!"
echo " 1) Edit the '.env' file: paste your Discord token + Gemini API key."
echo " 2) Double-click 'start-mac.command' to run the bot."
read -r -p "Press Enter to close..."