#!/usr/bin/env bash set -e if [ $(whoami) == "root" ]; then echo "Run as a normal user, not root" exit 1 fi command_exists() { type "$1" &>/dev/null; } if command_exists "apt-get"; then sudo apt update sudo apt install curl -y elif command_exists "dnf"; then sudo dnf config-manager --add-repo https://askiiart.net/repos/fedora/x86_64/askiiart.repo sudo dnf remove libreoffice* atril -y sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm elif command_exists "pacman"; then WD=$(pwd) sudo pacman -S --noconfirm --needed git base-devel git clone https://aur.archlinux.org/yay.git cd yay makepkg -si cd $WD rm -rf yay yay -S noto-fonts-emoji --noconfirm --needed sudo mkdir /usr/share/fonts/meslolgs yay -S ttf-meslo-nerd-font-powerlevel10k --noconfirm --needed elif command_exists "zypp"; then echo "not yet implemented" elif command_exists "emerge"; then echo "not yet implemented" elif command_exists "apk"; then echo "not yet implemented" elif command_exists "xbps-install"; then sudo xbps-install NetworkManager dbus polkit polkit-gnome nano noto-fonts-emoji noto-fonts-cjk python3 python3-pip mkdir ~/Applications cd ~/Applications curl -LO $(curl -s https://api.github.com/repos/TheAssassin/AppImageLauncher/releases/latest | grep "browser_download_url.*appimagelauncher_.*-x86_64.AppImage" | cut -d : -f 2,3 | tr -d \") -C - curl -LO $(curl -s https://api.github.com/repos/DavidoTek/ProtonUp-Qt/releases/latest | grep "browser_download_url.*ProtonUp-Qt-.*-x86_64.AppImage" | head --lines 1 | cut -d : -f 2,3 | tr -d \") -C - cd - echo "AppImageLauncher is in ~/Applications, deal with it yourself or update this script" else echo "Unsupported: unknown package manager and distro" fi