summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsteban Carnevale <alfplayer@mailoo.org>2014-11-05 11:33:44 -0300
committerEsteban Carnevale <alfplayer@mailoo.org>2014-11-05 11:33:44 -0300
commit02cf9a83034daed51ee7df83b8973ea1cafee9eb (patch)
tree206ab7a7fac84225ca9c8385f78457619309181e
parentfceeed2f1946ecc26610079d14867b2305fe0117 (diff)
pcr-vs-aur-git: Add script
-rwxr-xr-xpcr-vs-aur-git32
1 files changed, 32 insertions, 0 deletions
diff --git a/pcr-vs-aur-git b/pcr-vs-aur-git
new file mode 100755
index 0000000..fb706fd
--- /dev/null
+++ b/pcr-vs-aur-git
@@ -0,0 +1,32 @@
+#!/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