You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Marek Czernek <mc...@redhat.com> on 2018/10/01 19:48:04 UTC

Bug 62140 implementation question

Hi there,

I'd like to resolve Bug 62140 [0]. I just wanted to gather some opinions 
about the implementation details. In my mind, the following solution is 
quite reasonable:

 1. Create new help scripts, such as help.sh and help.bat. These files
    contain a method for each functional verb that prints some info
    about the verb and exits with 0.
 2. Source the files in both catalina.sh and catalina.bat
 3. When user enters catalina.[sh|bat] $verb help (or -h, --help?),
    execute one of the methods.

In my mind, the above solution is quite straightforward. Any gotchas, or 
obvious problems?

[0] https://bz.apache.org/bugzilla/show_bug.cgi?id=62140

Cheers,
-- 

Marek Czernek

JWS/JBCS Associate Quality Engineer, RHCA

Find me at www.halfastack.com


Re: Bug 62140 implementation question

Posted by Mitch Claborn <mi...@claborn.net>.
My only thought was the single-source value.  If it would be a lot of 
extra work to do the text file, then I think the original design is fine.


Mitch

On 10/02/2018 09:56 AM, Marek Czernek wrote:
> Well, I personally would prefer if it was  a soure-able (or call-able 
> for windows) script; otherwise, you'd have to parse the text file to 
> check which part of the text you want to output, since you don't want to 
> output all the text at once, but only for one particular verb.
> 
> Any particular benefits for a text file over two scripts? It's true it's 
> single-sourced, but given that all scripts are essentially duplicated 
> into .sh and .bat, I don't feel like that outweighs the ease of use and 
> extensibility of the help script files.
> 
> On 10/2/18 4:45 PM, Mitch Claborn wrote:
>> Are the available verbs the same for both .sh and .bat? If so, perhaps 
>> a text file that contains the actual help text that could be output 
>> from both .bat and .sh.
>>
>>
>> Mitch
>>
>> On 10/01/2018 02:48 PM, Marek Czernek wrote:
>>> Hi there,
>>>
>>> I'd like to resolve Bug 62140 [0]. I just wanted to gather some 
>>> opinions about the implementation details. In my mind, the following 
>>> solution is quite reasonable:
>>>
>>> 1. Create new help scripts, such as help.sh and help.bat. These files
>>>     contain a method for each functional verb that prints some info
>>>     about the verb and exits with 0.
>>> 2. Source the files in both catalina.sh and catalina.bat
>>> 3. When user enters catalina.[sh|bat] $verb help (or -h, --help?),
>>>     execute one of the methods.
>>>
>>> In my mind, the above solution is quite straightforward. Any gotchas, 
>>> or obvious problems?
>>>
>>> [0] https://bz.apache.org/bugzilla/show_bug.cgi?id=62140
>>>
>>> Cheers,
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Bug 62140 implementation question

Posted by Marek Czernek <mc...@redhat.com>.
Well, I personally would prefer if it was  a soure-able (or call-able 
for windows) script; otherwise, you'd have to parse the text file to 
check which part of the text you want to output, since you don't want to 
output all the text at once, but only for one particular verb.

Any particular benefits for a text file over two scripts? It's true it's 
single-sourced, but given that all scripts are essentially duplicated 
into .sh and .bat, I don't feel like that outweighs the ease of use and 
extensibility of the help script files.

On 10/2/18 4:45 PM, Mitch Claborn wrote:
> Are the available verbs the same for both .sh and .bat? If so, perhaps 
> a text file that contains the actual help text that could be output 
> from both .bat and .sh.
>
>
> Mitch
>
> On 10/01/2018 02:48 PM, Marek Czernek wrote:
>> Hi there,
>>
>> I'd like to resolve Bug 62140 [0]. I just wanted to gather some 
>> opinions about the implementation details. In my mind, the following 
>> solution is quite reasonable:
>>
>> 1. Create new help scripts, such as help.sh and help.bat. These files
>>     contain a method for each functional verb that prints some info
>>     about the verb and exits with 0.
>> 2. Source the files in both catalina.sh and catalina.bat
>> 3. When user enters catalina.[sh|bat] $verb help (or -h, --help?),
>>     execute one of the methods.
>>
>> In my mind, the above solution is quite straightforward. Any gotchas, 
>> or obvious problems?
>>
>> [0] https://bz.apache.org/bugzilla/show_bug.cgi?id=62140
>>
>> Cheers,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
-- 

Marek Czernek

JWS/JBCS Associate Quality Engineer, RHCA

Find me at www.halfastack.com


Re: Bug 62140 implementation question

Posted by Mitch Claborn <mi...@claborn.net>.
Are the available verbs the same for both .sh and .bat? If so, perhaps a 
text file that contains the actual help text that could be output from 
both .bat and .sh.


Mitch

On 10/01/2018 02:48 PM, Marek Czernek wrote:
> Hi there,
> 
> I'd like to resolve Bug 62140 [0]. I just wanted to gather some opinions 
> about the implementation details. In my mind, the following solution is 
> quite reasonable:
> 
> 1. Create new help scripts, such as help.sh and help.bat. These files
>     contain a method for each functional verb that prints some info
>     about the verb and exits with 0.
> 2. Source the files in both catalina.sh and catalina.bat
> 3. When user enters catalina.[sh|bat] $verb help (or -h, --help?),
>     execute one of the methods.
> 
> In my mind, the above solution is quite straightforward. Any gotchas, or 
> obvious problems?
> 
> [0] https://bz.apache.org/bugzilla/show_bug.cgi?id=62140
> 
> Cheers,

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org