source: trunk/lib/OpenGuides/Build.pm @ 57

Last change on this file since 57 was 57, checked in by kake, 19 years ago

Added note on PREREQUISITES, added Search::InvertedIndex? to prereqs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 805 bytes
Line 
1package OpenGuides::Build;
2
3use strict;
4use Module::Build;
5use base 'Module::Build';
6
7eval "use Config::Tiny";
8die "Config::Tiny is required to configure this application.\n" if $@;
9
10eval "use CGI::Wiki::Setup::Pg";
11die "CGI::Wiki is required to set up this application.\n" if $@;
12
13my $config = Config::Tiny->read("wiki.conf");
14my $dbname = $config->{_}->{dbname};
15my $dbuser = $config->{_}->{dbuser};
16my $dbpass = $config->{_}->{dbpass};
17my $dbhost = $config->{_}->{dbhost};
18
19sub ACTION_install {
20    my $self = shift;
21    $self->SUPER::ACTION_install;
22    print "Checking database schema...\n";
23    CGI::Wiki::Setup::Pg::setup( $dbname, $dbuser, $dbpass, $dbhost );
24}
25
26sub ACTION_fakeinstall {
27    my $self = shift;
28    $self->SUPER::ACTION_fakeinstall;
29    print "Checking database schema...\n";
30}
31
321;
Note: See TracBrowser for help on using the repository browser.