Spyhawk/pacaur — pull request #167 by polyphemus (2013-04-22 13:40:21+00:00)
Title: Fix sorting of CheckAur()

Fixes intermittent mismatch of packages and package versions when using '-Qu'.
Don't implicitly trust JSON result to be sorted the same way as they where requested.

example:

$ pacaur -Qu
...
:: extra qtwebkit 2.3.0-1 -> 2.3.1-1
:: extra sip 4.14.5-1 -> 4.14.6-1
:: extra udisks2 2.0.1-1 -> 2.1.0-1
:: aur sxhkd 0.2-2 -> 4.1.4-1
:: aur pacaur 4.1.3-1 -> 0.3-1
after patch:

$ pacaur -Qu
...
:: extra qtwebkit 2.3.0-1 -> 2.3.1-1
:: extra sip 4.14.5-1 -> 4.14.6-1
:: extra udisks2 2.0.1-1 -> 2.1.0-1
:: aur pacaur 4.1.3-1 -> 4.1.4-1
:: aur sxhkd 0.2-2 -> 0.3-1

this merely copies from elsewhere in `pacaur`.

If you would ever want to do some more complicated parsing this is where I got before I found the easier fix by further reading of `pacaur`, consider this unrelated to this patch:

IFS='
'
arr=($(