Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/check-linux-versions
blob: e39fb4707e851a6273df2ec266385f21ceca82fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash

for a in i486 i686 pentium4; do
  for r in core extra community testing community-testing staging community-staging; do
    for k in '' '-lts' '-pae' '-zen'; do
      kernels=$(
        find /mnt/archlinux32/${a}/${r} \
        -name 'linux*.zst' \
        -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"
      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/
'