mirror of
https://github.com/correl/dotfiles.git
synced 2024-12-22 19:17:34 +00:00
[provisioning] Use paru if available on arch
This commit is contained in:
parent
60785051ae
commit
2743f11ff9
1 changed files with 7 additions and 3 deletions
|
@ -16,14 +16,18 @@ function _pacman {
|
|||
}
|
||||
|
||||
function _yay {
|
||||
local yay=yay
|
||||
if command -v paru &>/dev/null; then
|
||||
yay=paru
|
||||
fi
|
||||
local pkg=$1
|
||||
if ! yay -Qi $pkg >/dev/null 2>&1; then
|
||||
if [ -z "$__yay_updated" ]; then
|
||||
_run "[yay] Synchronizing package databases" yay -Syy
|
||||
_run "[$yay] Synchronizing package databases" $yay -Syy
|
||||
__pacman_updated=yes
|
||||
fi
|
||||
_run "[yay] Install $pkg" yay -S --noconfirm $pkg
|
||||
_run "[$yay] Install $pkg" $yay -S --noconfirm $pkg
|
||||
else
|
||||
echo "[yay] $pkg is already installed, skipping."
|
||||
echo "[$yay] $pkg is already installed, skipping."
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue