my-scripts/installers/arch/scripts/aur-install.sh

38 lines
655 B
Bash
Raw Normal View History

2022-10-01 22:59:41 +00:00
#!/bin/sh
AUR_PROGS_FILE="$1"
2022-11-19 19:20:55 +00:00
YAY_INSTALL_DIR="$HOME/.local/src/yay"
2022-10-01 22:59:41 +00:00
yay_install() {
sudo pacman -S base-devel fakeroot
mkdir -p "$YAY_INSTALL_DIR"
git clone https://aur.archlinux.org/yay.git "$YAY_INSTALL_DIR"
cd "$YAY_INSTALL_DIR"
makepkg -si
}
2022-10-01 22:59:41 +00:00
pkg_install() {
aurprogs="$(cat "$AUR_PROGS_FILE")"
for pkg in $aurprogs
do
yay -S "$pkg"
done
}
2022-10-01 22:59:41 +00:00
if [ -f "$AUR_PROGS_FILE" ]; then
2022-10-01 22:59:41 +00:00
! [ -f "/usr/bin/yay" ] && yay_install
2022-10-01 22:59:41 +00:00
pkg_install
greetd_config
2023-01-08 02:16:01 +00:00
else
greetd_config
echo "enter file containing package names to install separated by newlines as first input argument" && exit
fi
2022-10-01 22:59:41 +00:00