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
|
#!/bin/bash
# Generate a list of Ubuntu releases
final_d="${FIANL_D:-/srv/jenkins}"
tmpd=$(mktemp -d)
trap "rm -rf ${tmpd}" EXIT SIGINT
# Get the regular info
ubuntu-distro-info --supported \
> ${tmpd}/ubuntu-supported.txt
ubuntu-distro-info --all \
> ${tmpd}/ubuntu-all.txt
ubuntu-distro-info --unsupported \
> ${tmpd}/ubuntu-unsupported.txt
ubuntu-distro-info --release --supported \
> ${tmpd}/ubuntu-versions.txt
# Populate releases which may be missing
for suite in vivid:15.04 wily:15.10 xenial:16.04;
do
echo "${suite%%:*}" >> ${tmpd}/ubuntu-supported.txt
echo "${suite%%:*}" >> ${tmpd}/ubuntu-all.txt
echo "${suite##*:}" >> ${tmpd}/ubuntu-versions.txt
done
# Sort and make it pretty
cat ${tmpd}/ubuntu-supported.txt \
| sort -r -u > ${final_d}/ubuntu-supported.txt
cat ${tmpd}/ubuntu-all.txt \
| egrep -v warty \
| sort -r -u > ${final_d}/ubuntu-all.txt
cat ${tmpd}/ubuntu-versions.txt \
| sed "s, ,-,g" \
| sort -r -u \
> ${final_d}/ubuntu-versions.txt
sort -r -u ${tmpd}/ubuntu-unsupported.txt \
> ${final_d}/ubuntu-unsupported.txt
|