Calendar: remove past event
[tails/test.git] / bin / iuk-source-versions
blobc3a9ec6ad81d1791909d78010f74cd0ae657486a
1 #!/bin/sh
3 set -e
4 set -u
6 IGNORED_TAGS="4.2.1"
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 tag ; do
32 if member "$tag" $IGNORED_TAGS; then
33 continue
35 version=$(echo "$tag" | perl -p -E 's,-,~,')
36 major_version=$(major_version "$version")
37 if [ "$major_version" = "$RELEASING_MAJOR_VERSION" ] && \
38 dpkg --compare-versions "$version" lt "$RELEASING_VERSION" ; then
39 echo "$version"
41 done
42 ) | sort --version-sort | xargs | tr -d '\n'