OSSP CVS Repository

ossp - Difference in ossp-pkg/shiela/shiela-install.sh versions 1.3 and 1.4
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/shiela/shiela-install.sh 1.3 -> 1.4

--- shiela-install.sh    2001/05/04 13:25:18     1.3
+++ shiela-install.sh    2001/05/04 13:30:00     1.4
@@ -272,25 +272,24 @@
     V_tool_perl="perl"
     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" -a ! -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
-        V_tool_perl="`cat $tmpfile | sort -u | tail -1 | cut '-d ' -f2`"
+        V_tool_perl="`cat $tmpfile | sort -u | tail -1 | cut -d: -f4`"
     fi
     rm -f $tmpfile
 fi

CVSTrac 2.0.1