/[gentoo-perl]/genlop/trunk/genlop
Gentoo

Diff of /genlop/trunk/genlop

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 178 Revision 179
915 } 915 }
916 } 916 }
917 } 917 }
918 if (!$info_ok) { print " none installed.\n"; } 918 if (!$info_ok) { print " none installed.\n"; }
919} 919}
920### 920
921# supporto iniziale per rsync/sync
922sub rsync() 921sub rsync() {
923{ 922 foreach my $this_logfile (@logfiles) {
924 my $date; 923 my $handle;
925 if ($_ =~ m/^(.*?)\: \=\=\= r?sync/g) 924 open_file($this_logfile, \$handle);
926 { 925 if ($gmt_found) {
927 if ($gmt_found) 926 while(<$handle>) {
928 { 927 if ($_ =~ m/^(.*?)\: \=\=\= Sync completed with/) {
929 $date = scalar gmtime "$1"; 928 print " rsync'ed at >>> ", colored((scalar gmtime "$1"), $COLORS{'green'}),"\n";
930 } 929 }
931 else 930 }
932 { 931 }
933 $date = scalar localtime "$1"; 932 else {
934 } 933 while(<$handle>) {
935 print " rsync'ed at >>> "; 934 if ($_ =~ m/^(.*?)\: \=\=\= Sync completed with/) {
936 print colored("$date\n", $COLORS{'green'}); 935 print " rsync'ed at >>> ", colored((scalar localtime "$1"), $COLORS{'green'}),"\n";
937 } 936# print scalar localtime "$1",' >>> ',$2,"\n";
937 }
938 }
939 }
940 close($handle);
941 }
942
938 print color 'reset'; 943 print color 'reset';
944
945 return 0;
939} 946}
940 947
941####### 948#######
942# *Start* 949# *Start*
943####### 950#######
977#cache_files(\@logfiles, \@logfile_cache); 984#cache_files(\@logfiles, \@logfile_cache);
978if (scalar @logfiles > 1) 985if (scalar @logfiles > 1)
979{ 986{
980 @logfiles = order_logs(@logfiles); 987 @logfiles = order_logs(@logfiles);
981} 988}
989
990# - Option -r given? >
991if ($rsync_found) {
992 rsync();
993 exit(0);
994}
995
982foreach my $ebuild_arg (@targets) 996foreach my $ebuild_arg (@targets)
983{ 997{
984 998
985 # this is for packages like gtk+ 999 # this is for packages like gtk+
986 $ebuild_arg =~ s/(\+)/\\$1/g; 1000 $ebuild_arg =~ s/(\+)/\\$1/g;
1002 } 1016 }
1003 } 1017 }
1004 } 1018 }
1005 if ($pretend_found) { &pretend; } 1019 if ($pretend_found) { &pretend; }
1006 if ($current_found) { &current; } 1020 if ($current_found) { &current; }
1007 if ($rsync_found) { &rsync; }
1008 if ($time_found or $info_found) 1021 if ($time_found or $info_found)
1009 { 1022 {
1010 if ($_ =~ m/^([0-9]{10})\: \>\>\> emerge .*?\) $pattern/) 1023 if ($_ =~ m/^([0-9]{10})\: \>\>\> emerge .*?\) $pattern/)
1011 { 1024 {
1012 $e_start = $1; 1025 $e_start = $1;

Legend:
Removed from v.178  
changed lines
  Added in v.179

  ViewVC Help
Powered by ViewVC 1.1.20