2023-09-06 20:54:23 -05:00
|
|
|
#!/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
|
2023-09-11 22:22:20 -05:00
|
|
|
sudo apt update
|
|
|
|
sudo apt install curl -y
|
2023-09-06 20:54:23 -05:00
|
|
|
elif command_exists "yum"; then
|
2023-09-11 22:22:20 -05:00
|
|
|
sudo dnf config-manager --add-repo https://askiiart.net/repos/fedora/x86_64/askiiart.repo
|
2023-09-06 20:54:23 -05:00
|
|
|
elif command_exists "pacman"; then
|
2023-09-07 16:34:26 -05:00
|
|
|
WD=$(pwd)
|
|
|
|
pacman -S --needed git base-devel
|
|
|
|
git clone https://aur.archlinux.org/yay.git
|
|
|
|
cd yay
|
|
|
|
makepkg -si
|
|
|
|
cd $WD
|
2023-09-06 20:54:23 -05:00
|
|
|
elif command_exists "zypp"; then
|
|
|
|
# Untested
|
2023-09-13 07:56:10 -05:00
|
|
|
echo "not yet implemented"
|
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"
|
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"
|
2023-09-06 20:54:23 -05:00
|
|
|
else
|
|
|
|
echo "Unsupported: unknown package manager and distro"
|
|
|
|
fi
|