Update IDF for download verification
[tails.git] / bin / iuk-source-versions
blob7dce33f7cc76e8d209ef0d767aeceaef3f147c67
1 #!/bin/sh
3 set -e
4 set -u
6 IGNORED_TAGS=""
8 major_version () {
9 local version="$1"
10 echo "$version" | perl -p -E 's,[.].*,,'
13 member () {
14 local item="$1"
15 shift
16 local found=no
17 for i in "$@"; do
18 if [ "$i" = "$item" ]; then
19 found=yes
20 break
22 done
24 [ "$found" = 'yes' ]
27 RELEASING_VERSION="$1"
28 RELEASING_MAJOR_VERSION=$(major_version "$RELEASING_VERSION")
31 git tag | while read -r tag ; do
32 # shellcheck disable=SC2086
33 if member "$tag" $IGNORED_TAGS; then
34 continue
36 version=$(echo "$tag" | perl -p -E 's,-,~,')
37 major_version=$(major_version "$version")
38 if [ "$major_version" = "$RELEASING_MAJOR_VERSION" ] && \
39 dpkg --compare-versions "$version" lt "$RELEASING_VERSION" ; then
40 echo "$version"
42 done
43 ) | sort --version-sort | xargs | tr -d '\n'