Skip to content

Commit

Permalink
Enforce correct load order in build-standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
mdom committed Jan 20, 2019
1 parent 041782a commit 05a7ae6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions build-standalone
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ open( my $standalone, '>', $target ) or die "Can't open target: $!\n";

print {$standalone} "#!/usr/bin/perl\n";

sub wanted {
return unless -f;
my @libraries = (
qw(
lib/App/termpub/Pager.pm
lib/App/termpub/Renderer.pm
lib/App/termpub/Epub.pm
lib/App/termpub/Epub/Chapter.pm
lib/App/termpub.pm
)
);

for ( @libraries ) {
open( my $fh, '<', $_ )
or die "Can't open $_: $!\n";
while (<$fh>) {
Expand All @@ -24,8 +33,6 @@ sub wanted {
}
}

finddepth( \&wanted, 'lib' );

my $script = 'script/termpub';

open( my $fh, '<', $script ) or die "Can't open $script: $!\n";
Expand Down

0 comments on commit 05a7ae6

Please sign in to comment.