]> code.delx.au - monosys/commitdiff
aur-check-updates: don't complain if a newer version is installed locally
authorJames Bunton <jamesbunton@delx.net.au>
Wed, 24 Jul 2019 22:18:57 +0000 (08:18 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Wed, 24 Jul 2019 22:19:42 +0000 (08:19 +1000)
aur-check-updates

index 2a238b33cbc9a071aa9af402f959e72e0439d393..c3402da39159ddd63da129adc8da53bb50979b6a 100755 (executable)
@@ -12,7 +12,7 @@ done < <(if [ -t 0 ]; then pacman -Qm; else cat; fi)
 
 curl -gsSf "$query_url" | jq -r '.results[] | .Name, .Version, "\u0000"' | while read -r -d $'\0' pkg aur_version; do
     installed_version="${pkg_versions[$pkg]}"
-    if [ "$installed_version" != "$aur_version" ]; then
+    if ! echo -e "${installed_version}\n${aur_version}" | pacsort | tail -n1 | grep -qxF "${installed_version}"; then
         echo "${pkg} $installed_version -> $aur_version"
     fi
 done