configs/distro-specific.bash

39 lines
1.7 KiB
Bash
Raw Normal View History

#!/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 "yum"; then
sudo dnf config-manager --add-repo https://askiiart.net/repos/fedora/x86_64/askiiart.repo
2023-10-10 13:27:57 -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
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
yay -S noto-fonts-emoji --noconfirm --needed
sudo mkdir /usr/share/fonts/meslolgs
sudo curl -L https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_regular.ttf?raw=true -o /usr/share/fonts/meslolgs/mesloLGS_NF_regular.ttf
sudo curl -L https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_bold.ttf?raw=true -o /usr/share/fonts/meslolgs/mesloLGS_NF_bold.ttf
sudo curl -L https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_italic.ttf?raw=true -o /usr/share/fonts/meslolgs/mesloLGS_NF_italic.ttf
sudo curl -L https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_bold_italic.ttf?raw=true -o /usr/share/fonts/meslolgs/mesloLGS_NF_bold_italic.ttf
elif command_exists "zypp"; then
2023-09-13 07:56:10 -05:00
echo "not yet implemented"
elif command_exists "emerge"; then
2023-09-13 07:56:10 -05:00
echo "not yet implemented"
elif command_exists "apk"; then
2023-09-13 07:56:10 -05:00
echo "not yet implemented"
else
echo "Unsupported: unknown package manager and distro"
fi