Skip to content

Commit cf2ad52

Browse files
committed
[update] : Install yay only install list is not 0
1 parent 45f434f commit cf2ad52

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

system/aur.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pacman-key --init
5555
ls "/usr/share/pacman/keyrings/"*".gpg" | sed "s|.gpg||g" | xargs | pacman-key --populate
5656

5757
# Un comment the mirror list.
58-
sed -i "s/#Server/Server/g" "/etc/pacman.d/mirrorlist"
58+
#sed -i "s/#Server/Server/g" "/etc/pacman.d/mirrorlist"
5959

6060
# Install yay
6161
if ! pacman -Qq yay 1> /dev/null 2>&1; then

system/pkgbuild.sh

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -82,34 +82,34 @@ pacman-key --init
8282
ls "/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
11089
cd "${pkgbuild_dir}"
11190
makedepends=() depends=() pkgbuild_dirs=($(ls "${pkgbuild_dir}" 2> /dev/null))
11291
if (( "${#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

Comments
 (0)