summaryrefslogtreecommitdiff
path: root/check-linux-versions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-08-18 15:14:12 +0200
committerErich Eckner <git@eckner.net>2019-08-18 15:14:12 +0200
commit6dfd2712428994166611d2ccb83c1f950a28374a (patch)
tree7dc691e3959ff3ed67b1d8cb462d0c41bc0daa6a /check-linux-versions
parent737d89dbaee53888ce1499483ee0ed3d44444826 (diff)
downloaddevops-6dfd2712428994166611d2ccb83c1f950a28374a.tar.xz
check-linux-versions new (it's a stub)
Diffstat (limited to 'check-linux-versions')
-rwxr-xr-xcheck-linux-versions57
1 files changed, 57 insertions, 0 deletions
diff --git a/check-linux-versions b/check-linux-versions
new file mode 100755
index 0000000..7d3e6d3
--- /dev/null
+++ b/check-linux-versions
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+for a in i486 i686 pentium4; do
+ for r in core extra community testing community-testing; do
+ for k in '' '-lts' '-pae' '-zen'; do
+ kernels=$(
+ find /mnt/archlinux32/${a}/${r} \
+ -name 'linux*.xz' \
+ -printf '%f\n' \
+ | grep "^linux${k}"'\(\|-docs\|-headers\)-[0-9]'
+ ) || continue
+ kernels=$(
+ printf '%s\n' "${kernels}" \
+ | sed '
+ s/\(linux'"$k"'\)\(\|-docs\|-headers\)-\([^-]\+-[^-]\+\)-[^-]\+$/\1\2 \1 \3/
+ ' \
+ | sort -k1,1
+ )
+ errors=$(
+ printf '%s\n' "${kernels}" \
+ | uniq -cf2 \
+ | grep -v '^\s*3\s'
+ ) || continue
+ echo "$a/$r/linux$k" \
+ | sed '
+ s@/\(community-\)\?testing/@/\1staging/@
+ t
+ s@/\(core\|extra\)/@/testing/@
+ t
+ s@/community/@/community-testing/@
+ t
+ '
+ echo "$kernels"
+ echo
+ done
+ done
+done
+
+exit
+
+#
+ \
+| sed '
+ s/-\([^-]\+-[^-]\+\)-[^-]\+$/ \1/
+ s/\(-docs\|-headers\|\) / \1- /
+ s@^.*/\([^/]\+/[^/]\+/[^/]\+\) \(\S\+\)$@\1 \2@
+' \
+| sort -k1,1 \
+| uniq -cf2 \
+| sed '
+ s/^\s*[12]\s\+//
+ t
+ d
+' \
+| sed '
+ s/ \(-\S\+\)\?-/\1/
+'