summaryrefslogtreecommitdiff
path: root/games-rpg/wastesedge/files/wastesedge-0.3.8_version-handling.patch
blob: 33f3eedad1e55f59c299f1f4ea6a9b29e86ea2f7 (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
From b3987b74cc6ff89187b95c692a4aacc13db98564 Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Wed, 9 Sep 2020 20:01:41 +0300
Subject: [PATCH] Rework adonthell version handling

---
 configure.ac | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 76d87bd..fff8268 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,15 +46,10 @@ fi
 
 dnl Checking for the proper version
 AC_MSG_CHECKING(for Adonthell's version)
-$adonthell_binary -v &> adonthell.ver
 
-changequote(<<, >>)
-adonthell_major_ver=`sed 's/\([0-9]*\)\.[0-9]*\.[0-9]*/\1/p; d' adonthell.ver`
-adonthell_minor_ver=`sed 's/[0-9]*\.\([0-9]*\)\.[0-9]*/\1/p; d' adonthell.ver`
-adonthell_micro_ver=`sed 's/[0-9]*\.[0-9]*\.\([0-9]*\)/\1/p; d' adonthell.ver` 
-changequote([, ])
-
-rm -f adonthell.ver
+adonthell_major_ver=$($adonthell_binary -v | cut -d'.' -f1)
+adonthell_minor_ver=$($adonthell_binary -v | cut -d'.' -f2)
+adonthell_micro_ver=$($adonthell_binary -v | cut -d'.' -f3)
 
 adonthellver="$adonthell_major_ver.$adonthell_minor_ver.$adonthell_micro_ver"
 
-- 
2.26.2