Author: cazfi
Date: Mon Jan  4 13:34:41 2016
New Revision: 31342

URL: http://svn.gna.org/viewcvs/freeciv?rev=31342&view=rev
Log:
Made autogen.sh version detection to work even when some perl-based tool has
internal problems resulting in warnings being printed on launch.

Reported by Christian Knoke <chrisk>

See bug #24259

Modified:
    trunk/autogen.sh

Modified: trunk/autogen.sh
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/autogen.sh?rev=31342&r1=31341&r2=31342&view=diff
==============================================================================
--- trunk/autogen.sh    (original)
+++ trunk/autogen.sh    Mon Jan  4 13:34:41 2016
@@ -177,8 +177,8 @@
     return 1
   }
 
-  # the following line is carefully crafted sed magic
-  pkg_version=`$PACKAGE --version 2>&1|head -n 1|sed 
's/([^)]*)//g;s/^[a-zA-Z\.\ \-]*//;s/ .*$//'`
+  # The following line is carefully crafted sed magic
+  pkg_version=`$PACKAGE --version 2>&1|grep -v " line " |head -n 1|sed 
's/([^)]*)//g;s/^[a-zA-Z\.\ \-]*//;s/ .*$//'`
   debug "pkg_version $pkg_version"
   pkg_major=`echo $pkg_version | cut -d. -f1`
   pkg_minor=`echo $pkg_version | sed s/[-,a-z,A-Z].*// | cut -d. -f2`
@@ -188,7 +188,7 @@
 
   debug "found major $pkg_major minor $pkg_minor micro $pkg_micro"
 
-  #start checking the version
+  # Start checking the version
   if [ "$pkg_major" -lt "$MAJOR" ]; then
     WRONG=1
   elif [ "$pkg_major" -eq "$MAJOR" ]; then


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to