#!/bin/bash # alfplayer # 2014-06-12 # # Compare package versions of Parabola's PCR and Arch's AUR. # A local copy of aur-mirror.git must exist locally. set -e cd aur-mirror pattern="$1" expac -S '%r/%n %v %b %p' -t '%F %T %z' | grep "^pcr" | cut -b 5- | \ awk -v pattern="$pattern" "\$1 ~ pattern" | while IFS= read -r line do set -- ${line} if [[ -e ${1}/PKGBUILD ]] ; then # Skip plowshare because its pkgver is too long [[ ${1} =~ plowshare ]] && continue source ${1}/PKGBUILD && [[ "${2}" < "${pkgver}-${pkgrel}" ]] && { printf "%-40s%15s %-20s %-50s\n" "${1}" "${2}" "${3} ${4} ${5}" "${*: 6}" date="$(git log -1 --format='%ci' -- "${1}/PKGBUILD")" printf "%-40s%15s %-50s\n" "${pkgname}" "${pkgver}-${pkgrel}" "${date}" echo -- } else echo "${1} is not in AUR" echo -- fi done