Last active
March 4, 2021 00:36
-
-
Save ichramm/c62cff6d46a9c273d94617c8b1c82ba2 to your computer and use it in GitHub Desktop.
(Archlinux) Update check for packages installed from the AUR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pacman -Qmq | while read package; do | |
cur_version=$(pacman -Qi $package | egrep 'Version *:' | sed 's/Version *: *//'); # fast | |
aur_version=$(yaourt -Si $package | egrep 'Version *:' | sed 's/Version *: *//'); # slow | |
if [ "$cur_version" = "$aur_version" ]; then | |
echo -e "\e[0;32mUp to date: \e[0m$package"; | |
else | |
echo -e "\e[1;33mNeeds update: \e[0m$package \e[0;33m(installed: $cur_version, aur: $aur_version)\e[0m"; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment