-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·47 lines (39 loc) · 1.12 KB
/
setup.sh
File metadata and controls
executable file
·47 lines (39 loc) · 1.12 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
#!/usr/bin/env bash
# Setup script for Facebook Group Invite Automation
# Usage: bash setup.sh
set -euo pipefail
echo "=== Facebook Group Invite Automation — Setup ==="
echo ""
# Check Python
if ! command -v python3 &>/dev/null; then
echo "ERROR: Python 3 is required but not found."
echo "Install it from https://www.python.org/downloads/"
exit 1
fi
PYTHON_VERSION=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
echo "Found Python $PYTHON_VERSION"
# Create virtual environment
if [ ! -d "venv" ]; then
echo "Creating virtual environment…"
python3 -m venv venv
echo "Virtual environment created."
else
echo "Virtual environment already exists."
fi
# Activate
echo "Activating virtual environment…"
source venv/bin/activate
# Install dependencies
echo "Installing dependencies…"
pip install --upgrade pip -q
pip install -r requirements.txt -q
echo "Dependencies installed."
echo ""
echo "=== Setup complete! ==="
echo ""
echo "To run the script:"
echo " source venv/bin/activate"
echo " python main.py"
echo ""
echo "For help:"
echo " python main.py --help"