Using the prepare script from revision 3248, I found some oddities.

First, in the usage, the usage line implies that all options are optional 
(scriptname [option1 .. optionN]).
However, the company option is required.

In addition, the --pgsql-contrib option is supposed to be optional, 
apparently.  The code even suggests this.  However, it isn't (see the test 
for "ignore"--not the standard way that the script handles empty options, 
either).

So, I think, the proper fix here, is to make this option optional, by 
giving it some logic to find the path on its own.  At least, I think that 
was Erik's intent.

For now, the below patch adds it to the usage as non-optional, along with 
company.

I've also fixed some typos and similar.

Lastly, I took away the "set -x" at the top.  The results of leaving it 
in, imho, are confusing to the script's "normal user" target audience.
Maybe that's debatable, but I don't see that it is doing anything critical 
for the user experience by being on.

Suggested patch follows...

Luke

--- orig/tools/prepare-company-database.sh      2011-06-14 22:03:22.000000000 
+0000
+++ ledgersmb/tools/prepare-company-database.sh 2011-06-16 00:33:47.000000000 
+0000
@@ -1,7 +1,5 @@
  #!/bin/sh

-set -x
-
  # Script to explain the steps to take when installing LedgerSMB

  # Default variable values section
@@ -28,10 +26,10 @@
  usage () {
  script_name=`basename $0`
  cat <<USAGE
-usage: $script_name [option1 .. optionN]
+usage: $script_name --company COMPANY --psql-contrib DIR [option1 .. optionN]

  This script wants to be run as the root user. If you don't, you'll be
-asked to enter the password of the 'postres' user
+asked to enter the password of the 'postgres' user

  This script creates a 'ledgersmb' user on the specified PostgreSQL host,
  if it does not exist.  Then it proceeds to load the LedgerSMB database
@@ -46,7 +44,7 @@
  Last name:   $ADMIN_LASTNAME   (NULL == none)
  Country:     'US'

-This default user will be assigned all priviledges within the application.
+This default user will be assigned all privileges within the application.

  Available options:
   --srcdir     The path where the sources for LedgerSMB are located
@@ -56,7 +54,7 @@
   --host               The PostgreSQL host to connect to (see 'man psql') 
[$host]
   --port               The PostgreSQL port to connect to (see 'man psql') 
[$port]
   --pgsql-contrib The directory where the tsearch2.sql, pg_trgm.sql and
-                tablefunc.sql PostgeSQL are located [$pgslq_contrib_dir]
+                tablefunc.sql PostgeSQL are located [$pgsql_contrib_dir]
   --company    The name of the database to be created for the company [*]
   --owner      The name of the superuser which is to become owner of the
                company's database [$owner]



On Sat, 11 Jun 2011, Erik Huelsmann wrote:

> Since most of you probably don't follow the commits or development
> list very closely, I thought I'd send an update to the users list
> summarizing recent activity.
>
> Over the past 4 weeks there have been almost 100 commits to the
> repository. As a result, many of the patches pending in SourceForge's
> patch tracker have now been committed [with the remainder otherwise or
> previously resolved]. Several bugs registered during that period have
> been fixed already. The same is applies to bugs which have been long
> outstanding.
>
> While I have been focusing on user experience (fixing menus,
> authorization problems and broken queries),  Chris focussed on the
> more technical and deeply rooted issues such as a mistake in tax (VAT)
> calculation.
>
> Today, I committed new INSTALL documentation which - combined with
> some scripts I've committed over the past week - should greatly
> facilitate the trunk (1.3-development) installation experience.
>
>
> At this time, if anyone wants to contribute to the development of
> LedgerSMB 1.3, I'd love to get feedback on the new INSTALL document -
> including documentation submission for other distributions and OSes.
>
> If you feel like testing, please submit your experiences (good and bad)!
>
>
> Bye,
>
>
> Erik.
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Ledger-smb-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Ledger-smb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel

Reply via email to