@@ -82,34 +82,34 @@ pacman-key --init
8282ls " /usr/share/pacman/keyrings/" * " .gpg" | sed " s|.gpg||g" | xargs | pacman-key --populate
8383
8484# Un comment the mirror list.
85- sed -i " s/#Server/Server/g" " /etc/pacman.d/mirrorlist"
86-
87- # Install yay
88- if ! pacman -Qq yay 1> /dev/null 2>&1 ; then
89- (
90- _oldpwd=" $( pwd) "
91- pacman -Syy --noconfirm --config " /etc/alteriso-pacman.conf"
92- pacman --noconfirm -S --asdeps --needed go --config " /etc/alteriso-pacman.conf"
93- sudo -u " ${build_username} " git clone " https://aur.archlinux.org/yay.git" " /tmp/yay"
94- cd " /tmp/yay"
95- sudo -u " ${build_username} " makepkg --ignorearch --clean --cleanbuild --force --skippgpcheck --noconfirm
96- pacman --noconfirm --config " /etc/alteriso-pacman.conf" -U $( sudo -u " ${build_username} " makepkg --packagelist)
97- cd ..
98- rm -rf " /tmp/yay"
99- cd " ${_oldpwd} "
100- )
101- fi
102-
103- if ! type -p yay > /dev/null; then
104- echo " Failed to install yay"
105- exit 1
106- fi
85+ # sed -i "s/#Server/Server/g" "/etc/pacman.d/mirrorlist"
10786
10887
10988# Parse SRCINFO
11089cd " ${pkgbuild_dir} "
11190makedepends=() depends=() pkgbuild_dirs=($( ls " ${pkgbuild_dir} " 2> /dev/null) )
11291if (( "${# pkgbuild_dirs[@]} " != 0 )) ; then
92+ # Install yay
93+ if ! pacman -Qq yay 1> /dev/null 2>&1 ; then
94+ (
95+ _oldpwd=" $( pwd) "
96+ pacman -Syy --noconfirm --config " /etc/alteriso-pacman.conf"
97+ pacman --noconfirm -S --asdeps --needed go --config " /etc/alteriso-pacman.conf"
98+ sudo -u " ${build_username} " git clone " https://aur.archlinux.org/yay.git" " /tmp/yay"
99+ cd " /tmp/yay"
100+ sudo -u " ${build_username} " makepkg --ignorearch --clean --cleanbuild --force --skippgpcheck --noconfirm
101+ pacman --noconfirm --config " /etc/alteriso-pacman.conf" -U $( sudo -u " ${build_username} " makepkg --packagelist)
102+ cd ..
103+ rm -rf " /tmp/yay"
104+ cd " ${_oldpwd} "
105+ )
106+ fi
107+
108+ if ! type -p yay > /dev/null; then
109+ echo " Failed to install yay"
110+ exit 1
111+ fi
112+
113113 for _dir in ${pkgbuild_dirs[@]} ; do
114114 cd " ${_dir} "
115115 run_user bash -c " makepkg --printsrcinfo > .SRCINFO"
0 commit comments