discord-awesomeaudio/install.sh

43 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
is_package_installed() {
if command -v "$1" >/dev/null 2>&1; then
return 0
else
return 1
fi
}
if [[ -f /etc/os-release ]]; then
. /etc/os-release
if [[ "$ID" == "ubuntu" || "$ID_LIKE" == "ubuntu" ]]; then
if ! is_package_installed flatpak-builder; then
sudo apt update
sudo apt install -y flatpak-builder
fi
elif [[ "$ID" == "fedora" || "$ID_LIKE" == "fedora" ]]; then
if ! is_package_installed flatpak-builder; then
sudo dnf install -y flatpak-builder
fi
elif [[ "$ID" == "void" ]]; then
if ! is_package_installed flatpak-builder; then
sudo xbps-install -Sy flatpak-builder
fi
fi
fi
flatpak install flathub org.kde.Sdk//5.15-22.08
flatpak install flathub io.qt.qtwebengine.BaseApp//5.15-22.08
flatpak-builder build-dir lol.deadzone.discord-awesomeaudio.json --install --user --force-clean
echo "[Desktop Entry]
Name=Discord Awesome Audio
Exec=flatpak run lol.deadzone.discord-awesomeaudio
Icon=/path/to/application/icon.png
Type=Application
Categories=AudioVideo;Network;" > ~/.local/share/applications/discord-awesomeaudio.desktop
chmod +x ~/.local/share/applications/discord-awesomeaudio.desktop