-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall
More file actions
executable file
·39 lines (32 loc) · 1.04 KB
/
install
File metadata and controls
executable file
·39 lines (32 loc) · 1.04 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
#!/usr/bin/env bash
set -e
# Ruta del entorno virtual
VENV_DIR="venv"
# Crear el entorno si no existe
if [ ! -d "$VENV_DIR" ]; then
echo "Creando entorno virtual en $VENV_DIR..."
python3 -m venv "$VENV_DIR"
fi
# Activar el entorno
echo "Activando entorno virtual..."
source "$VENV_DIR/bin/activate"
# Actualizar pip
echo "Actualizando pip..."
pip install --upgrade pip
# Instalar dependencias de Python
echo "Instalando dependencias de Python..."
pip install python-dotenv pyTelegramBotAPI
# Instalar dependencias del sistema
echo "Instalando dependencias del sistema..."
if command -v apt >/dev/null 2>&1; then
sudo apt update
sudo apt install -y imagemagick streamer espeak libnotify-bin notify-osd
elif command -v brew >/dev/null 2>&1; then
brew install imagemagick streamer espeak libnotify
else
echo "⚠️ No se detectó ni apt ni brew. Instala manualmente las dependencias del sistema."
fi
echo "✅ Entorno configurado correctamente."
echo
echo "Para usarlo en el futuro, ejecutá:"
echo " source $VENV_DIR/bin/activate"