mirror of
https://github.com/samba-team/samba.git
synced 2025-05-28 21:05:48 +03:00
r19880: Eliminate duplicates in the output.
(This used to be commit 2a8c8e1f2de551f360271855f09d8ae6497fb326)
This commit is contained in:
parent
e984a98c10
commit
f98b34d0f2
@ -124,7 +124,21 @@ foreach my $pkg (@ARGV)
|
||||
push (@out, Cflags($pkg)) if ($opt_cflags);
|
||||
}
|
||||
|
||||
sub nub
|
||||
{
|
||||
my @list = @_;
|
||||
my @ret = ();
|
||||
my %seen = ();
|
||||
foreach (@list) {
|
||||
next if (defined($seen{$_}));
|
||||
push (@ret, $_);
|
||||
$seen{$_} = 1;
|
||||
}
|
||||
return @ret;
|
||||
}
|
||||
|
||||
if ($#out >= 0) {
|
||||
@out = nub(@out);
|
||||
print join(' ', @out) . "\n";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user