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

Re: Start of perl setup and drop db scripts

On 28/03/12 01:13, Chris Bennett wrote:
On Mon, Mar 26, 2012 at 04:22:59PM -0700, Chris Travers wrote:
I can't get any of this to indent right so I will attach the two files
and put up a copy at:
Thanks.  I will look at these shortly.  It's a little late to get them
in 1.3.14, but we can add them for 1.3.15 if they work.
That's fine. I uploaded new copies with important improvements.
Now has options for all the admin stuff, deals with not having a copy of
ledgersmb.conf, copies ledgersmb.conf.default to ledgersmb.conf, opens
an editor, which defaults to vi, with option to change it, to edit it
and save it before continuing.

As before, it skips contrib stuff if>  9.1.x.
--progress works fine, still a little rough on completely quiet except
for errors. But that's harmless.

Clearly dirt.pl is a silly name, but I just used the first stupid word
that popped into my head that was very different than existing names!

Once we're sure that everything is good at command line level, I want to
add subs to do print to STDOUT/STDERR vs using built-in stuff and making
work in a web environment.
Something like if ($ENV{CGI}) {CGI->print}
		elsif ($ENV{MOD_PERL}) {MOD_PERL->print}
		elsif ($ENV{CLI}) {CLI->print}

Don't take my if else seriously, though. :)
I need to get my head properly around how everything is put together so
we can decide how to integrate all of this properly.

I'm pretty sure these two scripts are working correctly.
Let me know if there are any problems.
I'll keep fiddling with them anyway to make cleaner and clearer.

Chris Bennett

Hi Chris,

Regarding the editor your script opens,
could I suggest that you try and open "nano" first and fall back to vi.
While I know vi is the editor of choice for many old school programmers,
most non programmers are totally lost in vi.
Nano on the other hand is fairly easy to use even for a novice, and seems
to be installed on most modern linux systems by default.

David G,