summaryrefslogtreecommitdiff
path: root/debian/leap-madison.sh
blob: d35659961fb6cf2153ebfd9b1538d6486649b12a (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
#!/bin/sh


usage() {
  echo "$0 <packagename>"
  echo "See which version of a LEAP package is included in which debian repo"
  exit 1
}

get_version() {
  repo="$1"
  dist="$2"
  component="$3"

  entry=$(curl -s "http://deb.leap.se/${repo}/dists/${dist}/${component}/binary-amd64/Packages" | grep -A 3 "^Package: ${name}")
  version=$(echo "${entry}" | grep '^Version' | cut -d':' -f 2 )
  echo "Repo ${repo}, dist ${dist}, component ${component}: ${version}"
}

name=$1

[ -z "$name" ] && usage

# Platform
for dist in jessie stretch
do
  for component in master snapshots staging 0.10
  do
    get_version platform ${dist} ${component}
  done
  echo
done
echo

# Client
for dist in stretch buster sid xenial yakkety zesty
do
  for component in master snapshots staging
  do
    get_version client ${dist} ${component}
  done
  echo
done
echo