modifications to aur-install.sh, move aur-programs.list to files

master
Alex 2022-12-23 22:07:58 -06:00
parent a09005fd58
commit 65ab202b15
3 changed files with 25 additions and 12 deletions

View File

@ -19,3 +19,4 @@ wob
tofi
sway-audio-idle-inhibit-git
shellcheck-bin
librewolf-bin

View File

@ -139,7 +139,8 @@ read input
[ "$input" = "y" ] && wireless
echo "installing AUR packages..."
sh ./scripts/aur-install.sh
sh ./scripts/aur-install.sh ./files/aur-programs.list
echo "Done installing AUR packages."
echo ""

View File

@ -1,21 +1,32 @@
#!/bin/sh
AUR_PROGS_FILE="$1"
YAY_INSTALL_DIR="$HOME/.local/src/yay"
[ -z "$AUR_PROGS_FILE" ] && AUR_PROGS_FILE="$PWD/aur-programs.list"
aurprogs="$(cat "$AUR_PROGS_FILE")"
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
}
pkg_install() {
aurprogs="$(cat "$AUR_PROGS_FILE")"
for pkg in $aurprogs
do
yay -S "$pkg"
done
}
if [ -f "$AUR_PROGS_FILE" ]; then
! [ -f "/usr/bin/yay" ] && yay_install
pkg_install
else
echo "enter file containing package names to install separated by newlines as first input argument" && exit
fi