[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getopt: illegal option -- l when trying to run prepare-company-database.sh on BSD
- Subject: Re: getopt: illegal option -- l when trying to run prepare-company-database.sh on BSD
- From: David Godfrey <..hidden..>
- Date: Thu, 22 Mar 2012 11:19:23 +0800
On 22/03/12 09:07, Chris Bennett wrote:
> On Wed, Mar 21, 2012 at 07:31:39PM -0500, Chris Bennett wrote:
>
>>> One of the key reasons for the shell scripts is that they are partly
>>> provided as documentation. Perl tools are possible and we actually
>>> have the main logic done for this in the LedgerSMB::Database class.
>>> The big thing is that between the options we have already:
>>>
> Maybe that should be an important detail in new install and upgrade scripts.
> Good commenting, but even more important, maybe an echo or pod section to explain
> each step and why it is done?
> -q quiet
> -v verbose
> -V verbose with echoing out details that explain what and why.
>
> I now comment my new code well, after a lot of suffering during
> maintenance!
>
> Chris Bennett
Hi Chris,
Just a quick point.
Please, pretty please don't use -V for increased verbosity.
-V often used to emit a version string, see the grep man page for example.
A better solution would be to either use multiple -v arguments, or parse
a numeric argument, or both for that matter.
eg: -vvv or -v3 or -v -v -v.
See Xorg -logverbose and genisoimage -v for realworld examples.
BTW: please don't forget to include at least --version as a long option.
David G.
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users