-
Notifications
You must be signed in to change notification settings - Fork 4
/
ccc
executable file
·40 lines (34 loc) · 958 Bytes
/
ccc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env perl
#=======================================================================
# ccc
# File ID: 39f48fea-5d37-11df-a444-90e6ba3022ac
# Mer oversiktlig cvs stat
#=======================================================================
use strict;
use warnings;
my ($FileLine, $WorkLine, $RepLine) =
( "", "", "");
open(FP, "cvs -n stat 2>/dev/null |") || die("Cannot open cvs pipe");
while (<FP>) {
chomp;
if (/^\?/) {
print "$_\n";
} else {
if (/^File: /) {
$FileLine = $_;
}
if (/^\s+Working/) {
$WorkLine = $_;
}
if (/^\s+Repository/) {
$RepLine = $_;
unless ($FileLine =~ /Up-to-date$/) {
print "----\n$FileLine\n$WorkLine\n$RepLine\n";
$FileLine = "";
$RepLine = "";
$WorkLine = "";
}
}
}
}
#### End of file ccc ####