X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3dc59d2c5d138c2fc31559681ecc1967789f15c9..3afe678dc3123e0c0d517501f6a4f5fcf1f5ea24:/tools/tesh/colorize.pl diff --git a/tools/tesh/colorize.pl b/tools/tesh/colorize.pl index 247c433569..9cc8d183c9 100755 --- a/tools/tesh/colorize.pl +++ b/tools/tesh/colorize.pl @@ -1,11 +1,18 @@ #!/usr/bin/perl -w + +# Copyright (c) 2010, 2014. The SimGrid Team. +# All rights reserved. + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the license (GNU LGPL) which comes with this package. + use Term::ANSIColor qw{:constants}; $Term::ANSIColor::AUTORESET = 1; while(<>){ - if($_ =~ m/^[-]\s.*/){ + if($_ =~ m/^(\d+\:\s)?[-]\s.*/){ print BOLD RED $_; - }elsif ($_ =~ m/^[+]\s.*/){ + }elsif ($_ =~ m/^(\d+\:\s)?[+]\s.*/){ print BOLD GREEN $_; }else{ print BOLD $_;