mirror of
https://github.com/SWG-Source/swg-main.git
synced 2026-01-16 20:04:18 -05:00
23 lines
342 B
Perl
Executable File
23 lines
342 B
Perl
Executable File
#!/bin/perl
|
|
|
|
die "usage: p4group username\n" if (@ARGV != 1 || $ARGV[0] =~ /^-[h?]/);
|
|
|
|
push(@check, $ARGV[0]);
|
|
while (@check)
|
|
{
|
|
$_ = shift @check;
|
|
open(P4, "p4 groups " . $_ . "|");
|
|
while (<P4>)
|
|
{
|
|
chomp;
|
|
if (!defined $groups{$_})
|
|
{
|
|
push(@check, $_);
|
|
$groups{$_} = 1;
|
|
}
|
|
}
|
|
close(P4);
|
|
}
|
|
|
|
print join("\n", sort keys %groups);
|