From 23c161720658f160e2a3aabcc0121a8c86721ac8 Mon Sep 17 00:00:00 2001 From: Von Random Date: Thu, 30 Jul 2015 21:41:08 +0300 Subject: [PATCH] update pmah to automatically download the shit, slower than cower, but at least it is working --- pmah.zsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pmah.zsh b/pmah.zsh index d06cebb..31c7d42 100755 --- a/pmah.zsh +++ b/pmah.zsh @@ -1,12 +1,19 @@ #!/usr/bin/env zsh # poor man's aur helper +uri='https://aur4.archlinux.org' for i in jq curl; do whence $i &>/dev/null || { printf "missing %s!\n" $i >&2; exit 1 } done - +updates=() pacman -Qm | while read package version; do - eval upstream=$(curl -s "https://aur4.archlinux.org/rpc.php?type=info&arg=$package"|jq '.results.Version?') + eval upstream=$(curl -s "$uri/rpc.php?type=info&arg=$package"|jq '.results.Version?') if [[ -n $upstream && $version != $upstream ]]; then printf "%s :: %s -> %s\n" $package $version $upstream + updates+=$package fi done +print "Do you want to download the pkgbuilds here? (C-c to cancel)" +read none +for i in $updates; do + git clone "$uri/$i.git" +done