Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
there is no windows on travis anyway
[simgrid.git] / tools / tesh / colorize.pl
1 #!/usr/bin/perl -w
2
3 # Copyright (c) 2010, 2014. The SimGrid Team.
4 # All rights reserved.
5
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the license (GNU LGPL) which comes with this package.
8
9 use Term::ANSIColor qw{:constants};
10 $Term::ANSIColor::AUTORESET = 1;
11
12 while(<>){
13     if($_ =~ m/^(\d+\:\s)?[-]\s.*/){
14         print BOLD RED $_;
15     }elsif ($_ =~ m/^(\d+\:\s)?[+]\s.*/){
16         print BOLD GREEN $_;
17     }else{
18         print BOLD $_;
19     }
20 }
21
22