Browse Source

installer: removed disused unhashdir sub

3.0.x
Galen Charlton 17 years ago
parent
commit
742ff2f477
  1. 45
      Makefile.PL

45
Makefile.PL

@ -577,51 +577,6 @@ sub _add_to_file_map {
}
}
=head2 unhashdir
This function unhashes the hash of hashes generated by hashdir().
This directory unhashing routine is the personal work of Chris Nighswonger (fbcit).
Modified here to build koha makefile. It lists all files and where to install each one.
It then returns a hash reference suitable for the PM variable above.
=cut
sub unhashdir{
my $dirhash = shift;
my $dirlevel = shift;
my $toplevel = $dirlevel;
for my $k1 ( sort keys %$dirhash ) {
if ($k1 ne '.' && $k1 ne '') {
$dirlevel = ( $dirlevel ? $dirlevel . '/' . $k1 : $k1 );
&unhashdir($dirhash->{ $k1 }, $dirlevel);
$dirlevel = $toplevel;
}
elsif ( $k1 eq '.' ) {
foreach my $file ( @{$dirhash->{ $k1 }} ) {
# TODO: There are some hacks here that may be able to be improved... -fbcit
if ( $file =~ /^./ ) { next; } # skip hidden files and directories.
elsif ( $file =~ /\.pm/ && $dirlevel =~ /C4/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(INST_LIBDIR)/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # C4/*.pm is copied to perl's lib namespace.
elsif ( $dirlevel !~ /koha-tmpl/ && $dirlevel =~ /(installer|errors)/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(PREFIX)/lib/cgi-bin/koha/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # error templates are copied to $(PREFIX)/lib/cgi-bin/koha/
elsif ( $dirlevel =~ /koha-tmpl/ && $dirlevel !~ /errors/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(INST_LIBDIR)/koha/templates/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # error templates are copied to $(INST_LIBDIR)/koha/templates/
elsif ( $dirlevel =~ /(misc|rss)/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(INST_LIBDIR)/koha/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # misc & rss are copied to koha,
# elsif ( $dirlevel =~ /(intranet-tmpl|opac-tmpl)/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(INST_LIBDIR)/koha/templates/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # Templates are copied to koha/templates,
elsif ( $file !~ /\.pl/ && $dirlevel =~ /etc/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(PREFIX)/share/koha/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # Misc etc to koha/etc
elsif ( $file =~ /\.pl/ ) { $result{ ($dirlevel ? $dirlevel . '/' . $file : $file) } = '$(PREFIX)/lib/cgi-bin/koha/' . ($dirlevel ? $dirlevel . '/' . $file : $file); } # CGIs are copied to $(PREFIX)/lib/cgi-bin/koha/ print $result{ ($dirlevel ? $dirlevel . '/' . $file : $file)},"\n\n";
}
next;
}
}
return \%result;
}
=head2 get_configuration_options
This prompts the user for various configuration options.

Loading…
Cancel
Save