From 671972569e9947ef304b2f22551455cb8f668716 Mon Sep 17 00:00:00 2001 From: Cahit Date: Fri, 22 May 2015 10:41:44 +0200 Subject: [PATCH] bugfix in compile script for wasa --- wasa/compile_periph_gsi.pl | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/wasa/compile_periph_gsi.pl b/wasa/compile_periph_gsi.pl index 8f0ef61..4c47373 100755 --- a/wasa/compile_periph_gsi.pl +++ b/wasa/compile_periph_gsi.pl @@ -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; + } } } -- 2.43.0