index : devops | |
Archlinux32 devs' convenience-scripts | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-08-18 15:14:12 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-08-18 15:14:12 +0200 |
commit | 6dfd2712428994166611d2ccb83c1f950a28374a (patch) | |
tree | 7dc691e3959ff3ed67b1d8cb462d0c41bc0daa6a | |
parent | 737d89dbaee53888ce1499483ee0ed3d44444826 (diff) |
-rwxr-xr-x | check-linux-versions | 57 |
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/ +' |