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

raeburn raeburn@source.lon-capa.org
Wed, 30 Dec 2009 22:42:20 -0000


raeburn		Wed Dec 30 22:42:20 2009 EDT

  Modified files:              
    /modules/TexConvert/tthperl	commands 
  Log:
  - Different commands needed to retrieve perl version for perl 5.8 and 5.10.
  - Add destination when copying a tth.so compiled for a specific perl version.
  
  
Index: modules/TexConvert/tthperl/commands
diff -u modules/TexConvert/tthperl/commands:1.17 modules/TexConvert/tthperl/commands:1.18
--- modules/TexConvert/tthperl/commands:1.17	Sun Jul  5 23:06:21 2009
+++ modules/TexConvert/tthperl/commands	Wed Dec 30 22:42:20 2009
@@ -10,7 +10,11 @@
 fi
 if test ! -f ../tthdynamic/tthfunc.c
 then
-        perlversion=`perl -Mstrict -wall -e "print join('.', map {ord} split('',\$^V,2));"`
+        perlversion=`perl -wall -e '$ver=$^V;  $ver=~s/^v//; $ver=~s/\.\d+$//; print $ver';`
+        if [[ $perlversion == ""  ]];
+        then
+            perlversion=`perl -Mstrict -wall -e "print join('.', map {ord} split('',\$^V,2));"`
+        fi
 
 	if test -f compiles/tth.so.$arch.$dist
 	then 
@@ -19,7 +23,7 @@
 	fi
         if test -f compiles/tth.so.$arch.perl.$perlversion
         then
-                cp compiles/tth.so.$arch.perl.$perlversion
+                cp compiles/tth.so.$arch.perl.$perlversion tth.so
                 exit 0
         fi
 	if test -f compiles/tth.so.$arch