OSSP CVS Repository

ossp - Difference in ossp-pkg/shtool/sh.path versions 1.13 and 1.14
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/shtool/sh.path 1.13 -> 1.14

--- sh.path      2000/06/14 18:39:01     1.13
+++ sh.path      2000/06/18 10:48:38     1.14
@@ -82,25 +82,24 @@
 if [ ".$opt_m" = .yes ] && [ ".$namelist" = .perl ]; then
     rm -f $tmpfile
     touch $tmpfile
-    c=0
     found=0
+    pc=99
     for dir in $paths; do
         dir=`echo $dir | sed -e 's;/*$;;'`
-        for perl in perl5 perl miniperl; do
-             if [ $minusx "$dir/$perl" ] && [ ! -d "$dir/$perl" ]; then
-                 perl="$dir/$perl"
-                 version=`$perl -v | grep version |\
-                          sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'`
-                 versionnum="`echo $version | sed -e 's/\.//g' -e 's/_//g'`"
-                 versionnum=`expr $versionnum - $c`
-                 echo "$versionnum $perl" >>$tmpfile
+        nc=99
+        for name in perl perl5 miniperl; do
+             if [ $minusx "$dir/$name" ] && [ ! -d "$dir/$name" ]; then
+                 perl="$dir/$name"
+                 pv=`$perl -e 'printf("%.3f", $]);'`
+                 echo "$pv:$pc:$nc:$perl" >>$tmpfile
                  found=1
              fi
+             nc=`expr $nc - 1`
         done
-        c=`expr $c + 1`
+        pc=`expr $pc - 1`
     done
     if [ $found = 1 ]; then
-        perl="`cat $tmpfile | sort -u | tail -1 | cut '-d ' -f2`"
+        perl="`cat $tmpfile | sort -u | tail -1 | cut -d: -f4`"
         rm -f $tmpfile
         echo "$perl"
         exit 0

CVSTrac 2.0.1