diff --git a/packaging/check_versions.sh b/packaging/check_versions.sh new file mode 100755 index 0000000..9f5784f --- /dev/null +++ b/packaging/check_versions.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +while read version_a version_b; do + version_a=$(echo $version_a | sed -e 's/-/./g') + version_b=$(echo $version_b | sed -e 's/-/./g') + printf "%s %s %s\n" "$version_a" $(pkg version -t "$version_a" "$version_b") "$version_b" +done < versions.txt + +while read version_a version_b; do + if dpkg --compare-versions "$version_a" lt "$version_b"; then + echo "$version_a < $version_b" + else + echo "$version_a >= $version_b" + fi +done < versions.txt diff --git a/packaging/versions.txt b/packaging/versions.txt new file mode 100644 index 0000000..920997b --- /dev/null +++ b/packaging/versions.txt @@ -0,0 +1,6 @@ +2.0.0-20220202-abcdef 2.0.1-20220203-123456 +2.0.0-10-gabcdef-20220202-hahh 2.0.0-10-gabcdef-20220203-hahh +2.0.0-10-gabcdef-20220202-hahh 2.0.0-11-g123456-20220201-abcd +2.0.0-10-gabcdef-20220202-hahh 2.0.0-110-g123456-20220201-abcd +2.0.0-11-g123456-20220201-abcd 2.0.1-20220120-abcd +3.0-20230101-abcd 3.0.1-20230204-bdbd