diff --git a/keys-and-mirrors/2-get-chaotic-keys-and-mirrors.sh b/keys-and-mirrors/2-get-chaotic-keys-and-mirrors.sh index e0a7f18..79a3e99 100755 --- a/keys-and-mirrors/2-get-chaotic-keys-and-mirrors.sh +++ b/keys-and-mirrors/2-get-chaotic-keys-and-mirrors.sh @@ -11,5 +11,35 @@ # ################################################################################################################## -yay -S chaotic-keyring --noconfirm --needed -yay -S chaotic-mirrorlist --noconfirm --needed \ No newline at end of file +package="yay" + +#---------------------------------------------------------------------------------- + +if pacman -Qi $package &> /dev/null; then + + echo "Installing with yay" + yay -S chaotic-keyring --noconfirm --needed + yay -S chaotic-mirrorlist --noconfirm --needed + +else + + if pacman -Qi trizen &> /dev/null; then + + echo "Installing with trizen" + trizen -S chaotic-keyring --noconfirm --needed + trizen -S chaotic-mirrorlist --noconfirm --needed + + elif pacman -Qi paru &> /dev/null; then + + echo "Installing with paru" + paru -S chaotic-keyring --noconfirm --needed + paru -S chaotic-mirrorlist --noconfirm --needed + + else + + echo "Install an AUR helper" + echo "You can use our script" + + fi + +fi diff --git a/keys-and-mirrors/3-build-and-install-yay-bin.sh b/keys-and-mirrors/3-build-and-install-yay-bin.sh new file mode 100755 index 0000000..4fb8b89 --- /dev/null +++ b/keys-and-mirrors/3-build-and-install-yay-bin.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +################################################################################################################## +# Written to be used on 64 bits computers +# Author : Erik Dubois +# Website : http://www.erikdubois.be +################################################################################################################## +################################################################################################################## +# +# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK. +# +################################################################################################################## + +source="https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yay-bin" +folder="alci-yay-bin" +name="PKGBUILD" + +mkdir /tmp/$folder +wget $source -O /tmp/$folder/$name +cd /tmp/$folder +makepkg -i