repo.or.cz
/
swg-src.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merged in Governor-Tarkin/swg-src (pull request #17)
[swg-src.git]
/
tools
/
p4group.pl
blob
40af5674c30123432350bc467a8cfec9812aacde
1
#!/bin/perl
2
3
die
"usage: p4group username
\n
"
if
(
@ARGV
!=
1
||
$ARGV
[
0
] =~
/^-[h?]/
);
4
5
push
(
@check
,
$ARGV
[
0
]);
6
while
(
@check
)
7
{
8
$_
=
shift
@check
;
9
open
(
P4
,
"p4 groups "
.
$_
.
"|"
);
10
while
(<
P4
>)
11
{
12
chomp
;
13
if
(!
defined
$groups
{
$_
})
14
{
15
push
(
@check
,
$_
);
16
$groups
{
$_
} =
1
;
17
}
18
}
19
close
(
P4
);
20
}
21
22
print join
(
"
\n
"
,
sort keys
%groups
);