Files
DownloadSM/run.sh
smolkik-code d77e00f029 add finders
2025-12-26 23:26:13 +07:00

21 lines
547 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
if [ -f ".env" ]; then
while IFS='=' read -r key value; do
[[ -n "$key" && ! "$key" =~ ^[[:space:]]*# ]] && export "$key"="$value"
done < <(grep -E '^[[:space:]]*[A-Za-z_][A-Za-z0-9_]*=[^[:space:]]*[[:space:]]*$' .env | sed 's/[[:space:]]*#.*$//' | tr -d '\r')
fi
python3 -m venv .venv || true
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -U -r requirements.txt
python -m pip install -U yt-dlp
mkdir -p downloads
exec python -m bot.app