Update git submodules
[LibreOffice.git] / bin / lolcat
blob27bb32624e084efafeac07785d3f9001efe41d63
1 #!/usr/bin/perl -w
3 use strict;
4 use IO::Handle;
6 die "Usage: $0 identifier\n" .
7 "(identifier is for example org.libreoffice)" unless $#ARGV == 0;
9 my $id = $ARGV[0];
11 open (LOGCAT, "adb logcat |") || die "Could not open pipe from adb logcat";
12 my $pid = '';
14 while (<LOGCAT>) {
15 if (m!^I/ActivityManager\( *\d+\): Start proc $id for activity .*: pid=(\d+)!) {
16 $pid = $1;
17 } elsif (m!^[EIWD]/[^(]+\( *$pid\)!) {
18 print $_;
19 STDOUT->flush();