Skip to content

Commit c386376

Browse files
committed
Semver thingy did not work
1 parent 4d7d8fe commit c386376

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

.gut/delta.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
template = "https://github.com/giellalt/template-lang-und"
2-
rev_id = 189
3-
template_sha = "5438107cc3b01d0ca6a436cc819b493886913aea"
2+
rev_id = 188
3+
template_sha = "039269192c86bc4e92e4de05023c97b6fa16b3e5"
44

55
[replacements]
66
__REPO__ = "lang-nso"

m4/giella-macros.m4

+3-18
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ AS_IF([test "x$enable_grammarchecker" != "xno"],
674674
then: pipx install git+https://github.com/divvun/giellaltgramtools
675675
])]),
676676
AC_MSG_RESULT(yes))
677-
_gtgramtool_min_version=1.0.1
677+
_gtgramtool_min_version=0.7.0
678678
gtgramtool_too_old_message="gtgramtool needs to be updated.
679679
If you installed it with pipx, run:
680680
pipx upgrade GiellaLTGramTools"
@@ -683,25 +683,10 @@ AS_IF([test "x${GTGRAMTOOL}" != xno],
683683
[_gtgramtool_version=$( "${GTGRAMTOOL}" --version | sed -e 's/^.*version //')],
684684
[_gtgramtool_version=0])
685685
AC_MSG_RESULT([$_gtgramtool_version])
686-
687-
# Function to compare version numbers
688-
m4_define([compare_versions], [
689-
m4_split([_gtgramtool_version], [gtgramtool_version_parts], [\[\.\]])
690-
m4_split([_gtgramtool_min_version], [min_version_parts], [\[\.\]])
691-
gtgramtool_version_ok=yes
692-
for i in 1 2 3; do
693-
if test ${gtgramtool_version_parts[$i]} -lt ${min_version_parts[$i]}; then
694-
gtgramtool_version_ok=no
695-
break
696-
elif test ${gtgramtool_version_parts[$i]} -gt ${min_version_parts[$i]}; then
697-
break
698-
fi
699-
done
700-
])
701-
702686
AS_IF([test "x$enable_grammarchecker" != "xno"],
703687
AC_MSG_CHECKING([whether the gtgramtool version is at least $_gtgramtool_min_version])
704-
compare_versions
688+
AX_COMPARE_VERSION([$_gtgramtool_version], [ge], [$_gtgramtool_min_version],
689+
[gtgramtool_version_ok=yes], [gtgramtool_version_ok=no])
705690
AS_IF([test "x${gtgramtool_version_ok}" != xno],
706691
[AC_MSG_RESULT([$gtgramtool_version_ok])],
707692
[AC_MSG_ERROR([$gtgramtool_too_old_message])]))

0 commit comments

Comments
 (0)