]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
bugfix in compile script for wasa
authorCahit <c.ugur@gsi.de>
Fri, 22 May 2015 08:41:44 +0000 (10:41 +0200)
committerCahit <c.ugur@gsi.de>
Fri, 22 May 2015 08:41:44 +0000 (10:41 +0200)
wasa/compile_periph_gsi.pl

index 8f0ef610361bd881ea10cb35ecac17aab1cbe987..4c473737be9f7f1c739d3f7a084547c697a0868d 100755 (executable)
@@ -194,7 +194,7 @@ if($map==1 || $all==1){
            }
            elsif(grep /WARNING - map: There are semantic errors in the preference file/, $_)
            {
-               print RED, "There are errors in the constraints file. Better have a look...", RESET;
+               print RED, "There are errors in the constraints file. Better have a look...\n\n", RESET;
                sleep(5); # ERROR -> sleep is effective before the print
                last;
            }
@@ -237,20 +237,22 @@ if($par==1 || $all==1){
        my @a = <$fh>;
        my $isSuccess = 0;
        $fh -> close;
+       my $i=1;
        foreach (@a)
        {
-           my @line = split(' ', $_);
-           if(@line && ($line[2] =~ m/^[0-9]+$/) && ($line[3] =~ m/^[0-9]+$/))
+           my @line = split(/\s+/, $_);
+
+           if(@line && ($line[2] =~ m/^[0-9]+$/) && ($line[4] =~ m/^[0-9]+$/))
            {   
-               if(($line[2] == 0) && ($line[3] == 0))
-               {
-                   print GREEN, "Copying $line[0].ncd file to workdir\n", RESET;
-                   my $c="cp $TOPNAME.dir/$line[0].ncd $TOPNAME.ncd";
-                   system($c);
-                   print "\n\n";
-                   $isSuccess = 1;
-                   last;
-               }
+               if(($line[2] == 0) && ($line[4] == 0))
+               {
+                   print GREEN, "Copying $line[0].ncd file to workdir\n", RESET;
+                   my $c="cp $TOPNAME.dir/$line[0].ncd $TOPNAME.ncd";
+                   system($c);
+                   print "\n\n";
+                   $isSuccess = 1;
+                   last;
+               }
            }
        }