Dispy-P3BOT/install_deps_fedora.sh

36 lines
972 B
Bash
Executable File

#!/usr/bin/env bash
#
# Install system dependencies for Dispy-P3BOT on Fedora.
#
# Installs Python + pip and ffmpeg. Fedora's main repos only ship the
# stripped-down "ffmpeg-free"; the full ffmpeg lives in RPM Fusion, which this
# script enables. After this, run ./run.sh which creates the virtualenv and
# installs the Python packages (discord.py, etc).
set -euo pipefail
if [[ $EUID -eq 0 ]]; then
SUDO=""
else
SUDO="sudo"
fi
echo "Enabling RPM Fusion (free) for full ffmpeg ..."
$SUDO dnf install -y \
"https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm"
echo "Installing dependencies with dnf ..."
# --allowerasing lets the full ffmpeg replace ffmpeg-free if it's installed.
$SUDO dnf install -y --allowerasing \
python3 \
python3-pip \
ffmpeg \
gcc \
libffi-devel \
python3-devel
echo
echo "Done. Next steps:"
echo " cp radioconfig.json.template radioconfig.json # then edit it"
echo " ./run.sh"