Added yay check

This commit is contained in:
Brad Ganley 2023-04-01 15:11:44 -05:00
parent 02867aa246
commit fc1c304fdc

View File

@ -18,16 +18,30 @@ case "$ID" in
alias burn='sudo apt-get autoremove'
;;
arch|archlinux)
# Install something bypassing the prompts
alias inst='sudo pacman -S --noconfirm'
# Do a basic update
alias update='sudo pacman -Syu --noconfirm'
# Upgrade everything
alias upgrade_all='sudo pacman -Syu --noconfirm && sudo pacman -Rns $(pacman -Qdtq) --noconfirm && sudo paccache -r'
# Search packages
alias pacs='pacman -Ss'
# Uninstall
alias burn='sudo pacman -Rns --noconfirm'
# Check if yay is installed
if command -v yay >/dev/null 2>&1; then
# Install something bypassing the prompts
alias inst='yay -S --noconfirm'
# Do a basic update
alias update='yay -Syu --noconfirm'
# Upgrade everything
alias upgrade_all='yay -Syu --noconfirm && yay -Rns $(pacman -Qdtq) --noconfirm && sudo paccache -r'
# Search packages
alias pacs='yay -Ss'
# Uninstall
alias burn='yay -Rns --noconfirm'
else
# Install something bypassing the prompts
alias inst='sudo pacman -S --noconfirm'
# Do a basic update
alias update='sudo pacman -Syu --noconfirm'
# Upgrade everything
alias upgrade_all='sudo pacman -Syu --noconfirm && sudo pacman -Rns $(pacman -Qdtq) --noconfirm && sudo paccache -r'
# Search packages
alias pacs='pacman -Ss'
# Uninstall
alias burn='sudo pacman -Rns --noconfirm'
fi
;;
alpine)
# Install something bypassing the prompts