[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2952] trunk



Revision: 2952
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2952&view=rev
Author:   einhverfr
Date:     2010-03-09 04:52:19 +0000 (Tue, 09 Mar 2010)

Log Message:
-----------
More db setup options

Modified Paths:
--------------
    trunk/Makefile.PL

Added Paths:
-----------
    trunk/install_interactive.pl

Modified: trunk/Makefile.PL
===================================================================
--- trunk/Makefile.PL	2010-03-07 05:37:50 UTC (rev 2951)
+++ trunk/Makefile.PL	2010-03-09 04:52:19 UTC (rev 2952)
@@ -33,9 +33,9 @@
 requires 'Error';
 requires 'CGI::Simple';
 
-build_requires 'Test::More';
-build_requires 'Test::Trap';
-build_requires 'Test::Exception';
+test_requires 'Test::More';
+test_requires 'Test::Trap';
+test_requires 'Test::Exception';
 
 feature 'POS module credit card processing support',
     -default => 0,
@@ -53,7 +53,7 @@
 # Rendering options
 feature 'PDF and Postscript output',
     -default => 0,
-    'Template::Plugin::Latex' => 0;
+    'Template::Plugin::Latex' => 1;
 
 feature 'OpenOffice.org output',
     -default => 0,
@@ -64,5 +64,14 @@
     -default => 0,
     'Excel::Template::Plus' => 0;
 
-auto_install;
+Makefile->postamble(
+     qq{installdb :: \n\tLSMB_INSTALL_DB=1 LSMB_TEST_DB=1 make test\n}
+);
+
+Makefile->postamble(
+     qq{installdb_interactive :: \n\tperl install_interactive.pl\n}
+);
+
+
+auto_install; # remove this line for 2.0
 WriteAll;

Added: trunk/install_interactive.pl
===================================================================
--- trunk/install_interactive.pl	                        (rev 0)
+++ trunk/install_interactive.pl	2010-03-09 04:52:19 UTC (rev 2952)
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+#
+use strict;
+
+print "Welcome to the interactive db setup and test utility.\n";
+
+print "POSTGRESQL DATABASE SETUP\n\n\n";
+print "Name of company file/database to install? ";
+
+chomp($ENV{LSMB_NEW_DB} = <STDIN>);
+
+
+print "Please enter the directory where I can find PostgreSQL contrib modules:\n";
+chomp($ENV{PG_CONTRIB_DIR} = <STDIN>);
+
+print "\n\nPostgreSQL superuser's username: ";
+chomp($ENV{PGUSER} = <STDIN>);
+
+print "Enter a password? (y/N) ";
+my $usepass = <STDIN>;
+chomp $usepass;
+if ('y' eq $usepass){
+    print "Password for $ENV{PGUSER}: ";
+    chomp($ENV{PGPASSWORD} = <STDIN>);
+}
+
+print "\n\n\nLedgerSMB Administrative User Setup\n\n\n";
+print "Administrator's first name? ";
+chomp ($ENV{LSMB_ADMIN_FNAME}= <STDIN>);
+print "Administrator's last name? ";
+chomp ($ENV{LSMB_ADMIN_LNAME}= <STDIN>);
+print "Administrator's Username? ";
+chomp ($ENV{LSMB_ADMIN_USERNAME}= <STDIN>);
+print "Administrator's Password? ";
+chomp ($ENV{LSMB_ADMIN_PASSWORD}= <STDIN>);
+
+print "\n\n\nChart of Accounts Setup\n\n\n";
+print "Country Code (2 letter code): ";
+chomp ($ENV{LSMB_COUNTRY_CODE}= <STDIN>);
+
+print "Chart of Accounts: ";
+chomp ($ENV{LSMB_LOAD_COA}= <STDIN>);
+
+print "Gifi (optional): ";
+chomp ($ENV{LSMB_LOAD_GIFI}= <STDIN>);
+
+system('make dbinstall');
+
+1;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.