2023-09-06 20:54:23 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
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
|
2023-09-11 22:22:20 -05:00
|
|
|
sudo apt update
|
|
|
|
sudo apt install curl -y
|
2024-06-02 13:57:01 -05:00
|
|
|
|
2023-12-06 21:47:27 -06:00
|
|
|
elif command_exists "dnf"; then
|
2024-12-06 22:21:21 -06:00
|
|
|
sudo dnf config-manager addrepo --from-repofile 'https://askiiart.net/repos/fedora/x86_64/askiiart.repo'
|
2023-12-28 01:21:21 -06:00
|
|
|
sudo dnf remove libreoffice* atril -y
|
2024-07-10 13:21:06 -05:00
|
|
|
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 -y
|
|
|
|
|
2024-12-19 18:44:56 -06:00
|
|
|
# disable firewall (poorly)
|
|
|
|
sudo firewall-cmd --permanent --zone=trusted --set-target=ACCEPT
|
|
|
|
lines=$(netstat -i | wc -l)
|
|
|
|
for interface in $(netstat -i | cut -f 1 -d ' ' | tail --lines $((lines - 2))); do
|
|
|
|
sudo firewall-cmd --zone=trusted --change-interface=$interface
|
|
|
|
done
|
2024-07-10 13:21:06 -05:00
|
|
|
elif command_exists "rpm-ostree"; then
|
|
|
|
sudo wget https://askiiart.net/repos/fedora/x86_64/askiiart.repo -O /etc/yum.repos.d/askiiart.repo
|
|
|
|
rpm-ostree 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 -y
|
|
|
|
sudo rpm-ostree apply-live --allow-replacement
|
|
|
|
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
2024-06-02 13:57:01 -05:00
|
|
|
|
2023-09-06 20:54:23 -05:00
|
|
|
elif command_exists "pacman"; then
|
2023-09-07 16:34:26 -05:00
|
|
|
WD=$(pwd)
|
2023-10-13 08:48:18 -05:00
|
|
|
sudo pacman -S --noconfirm --needed git base-devel
|
2023-09-07 16:34:26 -05:00
|
|
|
git clone https://aur.archlinux.org/yay.git
|
|
|
|
cd yay
|
|
|
|
makepkg -si
|
|
|
|
cd $WD
|
2023-11-23 12:31:51 -06:00
|
|
|
rm -rf yay
|
2024-06-02 13:57:01 -05:00
|
|
|
# get fast arch mirrors
|
|
|
|
yay -S rate-mirrors-bin
|
|
|
|
rate-mirrors --disable-comments-in-file --entry-country=US --protocol=https arch --max-delay 7200 | sudo tee /etc/pacman.d/mirrorlist
|
2023-11-23 12:31:51 -06:00
|
|
|
yay -S noto-fonts-emoji --noconfirm --needed
|
2024-06-02 13:57:01 -05:00
|
|
|
|
2023-09-06 20:54:23 -05:00
|
|
|
elif command_exists "zypp"; then
|
2023-09-13 07:56:10 -05:00
|
|
|
echo "not yet implemented"
|
2024-06-02 13:57:01 -05:00
|
|
|
|
2023-09-06 20:54:23 -05:00
|
|
|
elif command_exists "emerge"; then
|
2023-09-13 07:56:10 -05:00
|
|
|
echo "not yet implemented"
|
2024-06-02 13:57:01 -05:00
|
|
|
|
2023-09-06 20:54:23 -05:00
|
|
|
elif command_exists "apk"; then
|
2023-09-13 07:56:10 -05:00
|
|
|
echo "not yet implemented"
|
2024-06-02 13:57:01 -05:00
|
|
|
|
2024-04-17 21:41:40 -05:00
|
|
|
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
|
2024-04-20 20:35:22 -05:00
|
|
|
curl -LO $(curl -s https://api.github.com/repos/TheAssassin/AppImageLauncher/releases/latest | grep "browser_download_url.*appimagelauncher-lite.*-x86_64.AppImage" | cut -d : -f 2,3 | tr -d \") -C -
|
|
|
|
chmod +x appimagelauncher-lite*-x86_64.AppImage
|
2024-04-17 21:41:40 -05:00
|
|
|
cd -
|
|
|
|
echo "AppImageLauncher is in ~/Applications, deal with it yourself or update this script"
|
2024-04-20 20:35:22 -05:00
|
|
|
sudo xbps-install void-repo-multilib void-repo-nonfree
|
2024-06-02 13:57:01 -05:00
|
|
|
|
2023-09-06 20:54:23 -05:00
|
|
|
else
|
|
|
|
echo "Unsupported: unknown package manager and distro"
|
2024-06-02 13:57:01 -05:00
|
|
|
|
2023-09-06 20:54:23 -05:00
|
|
|
fi
|