From 742ff2f47717a17abd1c3d6bde92889fac788216 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 10 Dec 2007 10:43:11 -0600 Subject: [PATCH] installer: removed disused unhashdir sub --- Makefile.PL | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 034df5e0e9..b94f2fe5f0 100644 --- a/Makefile.PL +++ b/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. -- 2.20.1