Created
April 3, 2024 20:35
-
-
Save iodar/0ff803d3162f123396b27a3bf5814f1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Installs flatpak and configures 'flathub' as a repository for | |
# ubunut, mint or debian. | |
function get-dist-id { | |
echo "$(lsb_release -i | tail -n +1 | sed -Er "s/.*\:[[:space:]]//")" | |
} | |
function echo-install-prompt { | |
echo "Starting flatpak install" | |
echo "You will get asked your sudo password in order to install flatpak" | |
} | |
function install-ubuntu { | |
echo-install-prompt | |
sudo add-apt-repository -y ppa:flatpak/stable | |
sudo apt update | |
sudo apt install flatpak | |
sudo apt install gnome-software-plugin | |
} | |
function install-debian { | |
echo-install-prompt | |
sudo apt install flatpak | |
CURRENT_DESKTOP="$(env | grep XDG_CURRENT_DESKTOP | sed -r "s/XDG_CURRENT_DESKTOP=//")" | |
case "$CURRENT_DESKTOP" in | |
GNOME) | |
sudo apt install plasma-discover-backend-flatpak | |
;; | |
KDE) | |
sudo apt install gnome-software-plugin-flatpak | |
;; | |
esac | |
} | |
function configure-flathub { | |
echo "Adding 'flathub' as repository for 'flatpak'" | |
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
} | |
DIST_ID="$(get-dist-id)" | |
case "$DIST_ID" in | |
ubuntu) | |
install-ubuntu | |
configure-flathub | |
;; | |
debian) | |
install-debian | |
configure-flathub | |
;; | |
Linuxmint) | |
configure-flathub | |
;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function install-makemkv { | |
flatpak install flathub com.makemkv.MakeMKV | |
} | |
echo "Installing MakeMKV from 'flathub'" | |
install-makemkv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment