Fix generate_debian-edu_task again

Fix syntax errors
Switch the ignore code to walking a list instead
This commit is contained in:
Steve McIntyre 2018-08-01 11:01:33 +01:00
parent 1d955ed12c
commit 814b0dd97c
1 changed files with 12 additions and 10 deletions

View File

@ -52,6 +52,14 @@ print OUT " */\n";
open (INPKG, "\$BASEDIR/tools/catz $pkgfiles |") or die "Can't read input package files: $!\n";
$/ = ''; # Browse by paragraph
# Ignore a few tasks that we don't want, e.g. education-development,
# it's too big and pulls in all sorts of things that end users won't
# want/need
my @ignore_list = ('education-development',
'education-desktop-gnome',
'education-desktop-kde',
'education-desktop-lxde');
while (defined($_ = <INPKG>)) {
m/^Package: (\S+)/m and $pkg = $1;
m/^Filename: (\S+)/m and $filename = $1;
@ -61,16 +69,10 @@ while (defined($_ = <INPKG>)) {
next;
}
# *Except* education-development, it's too big and pulls in all
# sorts of things that end users won't want/need
if ($pkg =~ /^education-development/) {
next;
elsif ($pkg =~ /^education-desktop-gnome/) {
next;
elsif ($pkg =~ /^education-desktop-kde/) {
next;
elsif ($pkg =~ /^education-desktop-lxde/) {
# Except things on the ignore list
if (grep {$_ eq $pkg} @ignore_list) {
next;
}
print OUT "$pkg\n";
}