From e8abdc2640c1b0dfc95f7464fb52170cb653821f Mon Sep 17 00:00:00 2001 From: Von Random Date: Thu, 30 Jul 2015 20:13:09 +0300 Subject: [PATCH] pmah.zsh to replace cower -udd :< --- pmah.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 pmah.zsh diff --git a/pmah.zsh b/pmah.zsh new file mode 100755 index 0000000..d06cebb --- /dev/null +++ b/pmah.zsh @@ -0,0 +1,12 @@ +#!/usr/bin/env zsh +# poor man's aur helper +for i in jq curl; do + whence $i &>/dev/null || { printf "missing %s!\n" $i >&2; exit 1 } +done + +pacman -Qm | while read package version; do + eval upstream=$(curl -s "https://aur4.archlinux.org/rpc.php?type=info&arg=$package"|jq '.results.Version?') + if [[ -n $upstream && $version != $upstream ]]; then + printf "%s :: %s -> %s\n" $package $version $upstream + fi +done