2022-10-01 22:59:41 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-12-24 04:07:58 +00:00
|
|
|
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
|
|
|
|
2022-12-24 04:07:58 +00:00
|
|
|
yay_install() {
|
|
|
|
sudo pacman -S base-devel fakeroot
|
2022-12-23 02:06:03 +00:00
|
|
|
|
2022-12-24 04:07:58 +00:00
|
|
|
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
|
|
|
|
2022-12-24 04:07:58 +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
|
|
|
|
2022-12-24 04:07:58 +00:00
|
|
|
if [ -f "$AUR_PROGS_FILE" ]; then
|
2022-10-01 22:59:41 +00:00
|
|
|
|
2022-12-24 04:07:58 +00:00
|
|
|
! [ -f "/usr/bin/yay" ] && yay_install
|
2022-10-01 22:59:41 +00:00
|
|
|
|
2022-12-24 04:07:58 +00:00
|
|
|
pkg_install
|
|
|
|
|
2023-02-12 06:04:48 +00:00
|
|
|
greetd_config
|
|
|
|
|
2023-01-08 02:16:01 +00:00
|
|
|
|
|
|
|
|
2022-12-24 04:07:58 +00:00
|
|
|
else
|
2023-02-12 06:04:48 +00:00
|
|
|
greetd_config
|
2022-12-24 04:07:58 +00:00
|
|
|
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
|
|
|
|