Modify configure.sh to try using an AUR helper
When installing packages, if `pacman` doesn't find it in any of it's repositories, try installing it from the AUR using `yay`.
This commit is contained in:
parent
137b870e96
commit
75b978ac6a
1 changed files with 8 additions and 1 deletions
|
@ -20,7 +20,14 @@ function install_generic() {
|
|||
sudo dnf -y install "${dependency}"
|
||||
return 0
|
||||
elif [[ "${os}" == "arch" ]]; then
|
||||
sudo pacman -Sy --noconfirm "${dependency}"
|
||||
if ! sudo pacman -Sy --noconfirm "${dependency}" ; then
|
||||
if command -v yay > /dev/null 2>&1 ; then
|
||||
sudo -u $SUDO_USER yay -Sy --noconfirm "${dependency}"
|
||||
else
|
||||
echo "Could not install \"${dependency}\", either using pacman or the yay AUR helper. Please try installing it manually."
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
|
Loading…
Reference in a new issue