apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <d...@haxent.com.br>
Subject [patch 9/9] os_version sed expression
Date Fri, 27 Apr 2007 14:29:27 GMT
The current os_version sed expression does not handle kernel version strings
after 2.6.9.

davi@karmic:~/$ uname -r
2.6.20-15-generic
davi@karmic:~/$ echo os_version=`uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/'`
os_version=262
davi@karmic:~/$ echo os_version=`uname -r | sed -e 's/-.*//g' | sed -e 's/\.//g'`
os_version=2620

---
 srclib/apr/configure.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.2.x/srclib/apr/configure.in
===================================================================
--- 2.2.x.orig/srclib/apr/configure.in	2007-04-27 11:09:48.000000000 -0300
+++ 2.2.x/srclib/apr/configure.in	2007-04-27 11:09:52.000000000 -0300
@@ -514,7 +514,7 @@
         fi
         ;;
     *linux*)
-        os_version=`uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/'`
+        os_version=`uname -r | sed -e 's/-.*//g' | sed -e 's/\.//g'`
         ;;
     *)
         os_version=OS_VERSION_IS_NOT_SET

--

Mime
View raw message