[LON-CAPA-cvs] cvs: modules /TexConvert/tthperl commands

raeburn raeburn@source.lon-capa.org
Wed, 31 Mar 2010 14:59:37 -0000


raeburn		Wed Mar 31 14:59:37 2010 EDT

  Modified files:              
    /modules/TexConvert/tthperl	commands 
  Log:
  - Improved identification of major perl version which works for both 5.8 and 5.10.
  
  
Index: modules/TexConvert/tthperl/commands
diff -u modules/TexConvert/tthperl/commands:1.18 modules/TexConvert/tthperl/commands:1.19
--- modules/TexConvert/tthperl/commands:1.18	Wed Dec 30 22:42:20 2009
+++ modules/TexConvert/tthperl/commands	Wed Mar 31 14:59:37 2010
@@ -10,8 +10,8 @@
 fi
 if test ! -f ../tthdynamic/tthfunc.c
 then
-        perlversion=`perl -wall -e '$ver=$^V;  $ver=~s/^v//; $ver=~s/\.\d+$//; print $ver';`
-        if [[ $perlversion == ""  ]];
+        perlversion=`perl -wall -e '$ver=$^V;  $ver=~s/^v//; $ver=~s/\.\d+$//; $ver=~s/[^\d.]//g; print $ver';`
+        if [[ -z "$perlversion" ]];
         then
             perlversion=`perl -Mstrict -wall -e "print join('.', map {ord} split('',\$^V,2));"`
         fi