From: navarrop Date: Wed, 15 Dec 2010 17:31:00 +0000 (+0000) Subject: Add sort, buffer and mkfile to tesh.pl X-Git-Tag: v3.6_beta2~657 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/054d8100281e084acb9d8041999ba6c8b2da9b20?hp=317986722b1e90e467ac9850c9a7000130273564 Add sort, buffer and mkfile to tesh.pl git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9266 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/buildtools/Cmake/tesh.pl b/buildtools/Cmake/tesh.pl index 3b185ba80c..8de3293f0b 100755 --- a/buildtools/Cmake/tesh.pl +++ b/buildtools/Cmake/tesh.pl @@ -8,10 +8,13 @@ my($line2); my($execline); my($ok)=0; my($ok1)=0; +my($sort)=0; my($nb_arg)=0; my($result); my(@list1)=(); my(@list2)=(); +my(@list3)=(); +my(@buffer)=(); #options do{ @@ -56,10 +59,23 @@ if(!$ARGV[$nb_arg]){die "tesh.pl \n";} print "-- Tesh load file : $ARGV[$nb_arg]\n"; my($file)=$ARGV[$nb_arg]; open SH_LIGNE, $file or die "Unable to open $file. $!\n"; -print "\n"; + while(defined($line1=)) { - if($line1 =~ /^\$/){ #command line + if($line1 =~ /^\$ mkfile/){ #command line + $line1 =~ s/\$ //g; + chomp $line1; + print "-- Tesh exec_line : $line1\n"; + $line1 =~ s/mkfile//g; + `rm -f $line1`; + foreach(@buffer) + { + `echo $_ >> $line1`; + } + $execline = $line1; + @buffer = (); + } + elsif($line1 =~ /^\$/){ #command line $ok = 1; $line1 =~ s/\$\{srcdir\:\=\.\}/./g; $line1 =~ s/\$SG_TEST_EXENV//g; @@ -86,16 +102,48 @@ while(defined($line1=)) chomp $line1; push @list2, $line1; } + elsif($line1 =~ /^\