File create-suggests of Package patterns-openSUSE

#! /usr/bin/perl

my $inpsg = 0;
print "+Prc:\n";

my @lines;
my $only_online = 0;

while ( <STDIN> )
  {
    chomp;
    if ( $_ =~ m/^\+Psg:/ ) { $inpsg = 1; next; }
    $inpsg = 0 if ( $_ =~ m/^-Psg:/ );

    if ( $inpsg && !$only_online && $_ !~ m/^#/ )
      {
	push(@lines, $_);
      }

    $only_online = ( $_ =~ m/#pragma / );
  }

for my $line (sort @lines)
  {
    print "$line\n";
  }
print "-Prc:\n";
openSUSE Build Service is sponsored by