d10513dfc0
Test Plan: Test Plan: Check the following files have been updated from use strict; use warnings; to use Modern::Perl; services/itemrecorddisplay.pl suggestion/suggestion.pl tags/list.pl tags/review.pl virtualshelves/sendshelf.pl help.pl changelanguage.pl koha_perl_deps.pl debian/bd-to-depends debian/build-git-snapshot debian/list-deps docs/CAS/CASProxy/examples/koha_webservice.pl docs/CAS/CASProxy/examples/proxy_cas.pl docs/CAS/CASProxy/examples/proxy_cas_callback.pl docs/CAS/CASProxy/examples/proxy_cas_data.pl Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
30 lines
732 B
Perl
Executable file
30 lines
732 B
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
use Modern::Perl;
|
|
|
|
my @exclusions = (
|
|
'debhelper',
|
|
);
|
|
|
|
open my $control_fh, '<', 'debian/control' or die "Cannot open debian/control";
|
|
my @lines = <$control_fh>;
|
|
close $control_fh;
|
|
|
|
my @build_depends;
|
|
my $in_build_depends_block;
|
|
for my $line ( @lines ) {
|
|
chomp $line;
|
|
if ( $line =~ m|Build-Depends:| ) {
|
|
$in_build_depends_block = 1;
|
|
$line =~ s|Build-Depends:||;
|
|
}
|
|
next unless $in_build_depends_block;
|
|
if ( $line =~ m|^\s*$| ) {
|
|
last;
|
|
}
|
|
for my $dep ( split ',', $line ) {
|
|
$dep =~ s|^\s*||;
|
|
push @build_depends, $dep unless ( map { ( $dep =~ m|$_| ) ? 1 : () } @exclusions);
|
|
}
|
|
}
|
|
print 'koha:Depends=' . join ( ', ', @build_depends ) . "\n";
|