diff options
Diffstat (limited to 'check-linux-versions')
-rwxr-xr-x | check-linux-versions | 57 |
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/ +' |