<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 25/11/14 10:19, Benoit Peccatte
wrote:<br>
</div>
<blockquote cite="mid:547449AE.9020805@normation.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Le 25/11/2014 01:16, Jean Rémond a
écrit :<br>
</div>
<blockquote
cite="mid:CAO=cbAVH_2ChHWZhy8jfO2ucpRm7PcmJLQ-Ro1=fNhPXW8pEjQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>Hello guys,<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
Hello Jean,<br>
<br>
<blockquote
cite="mid:CAO=cbAVH_2ChHWZhy8jfO2ucpRm7PcmJLQ-Ro1=fNhPXW8pEjQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Here are my 2 cents for the command-line :<br>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</blockquote>
<br>
Thanks for these Jean! :)<br>
<br>
<blockquote cite="mid:547449AE.9020805@normation.com" type="cite">
<blockquote
cite="mid:CAO=cbAVH_2ChHWZhy8jfO2ucpRm7PcmJLQ-Ro1=fNhPXW8pEjQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div> </div>
- make the help available from any argument and
coherent, ex : "rudder agent help" and "rudder help
agent" should return the same information <br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
Already done :)<br>
<br>
<blockquote
cite="mid:CAO=cbAVH_2ChHWZhy8jfO2ucpRm7PcmJLQ-Ro1=fNhPXW8pEjQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>- standardize debug flag (-d and/or --debug for
example) and make it applicable through all levels (any
nested script should respect debug flag)<br>
</div>
- it does exist so : do NOT use information from headers
inside the script, it mixes comments and code logic (see
Debian apache2 modules dependencies or LSB init script)<br>
</div>
</div>
</div>
</blockquote>
<br>
We use them for documentation, like a lot of language do with
annotations This is useful to keep the help data on the
sub-command side without having to run them all the time. <big><br>
<br>
</big><br>
<blockquote
cite="mid:CAO=cbAVH_2ChHWZhy8jfO2ucpRm7PcmJLQ-Ro1=fNhPXW8pEjQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>- be careful to any dependency added (rsync for example
in the pull request)<br>
</div>
</div>
</blockquote>
<br>
Well spotted, we try to add as few dependencies as possible on the
client side, we will replace rsync with something else.<br>
</blockquote>
<br>
I just noticed that we also depend on "service" and "uuidgen", which
I'm pretty sure are not available on AIX... (see
<a class="moz-txt-link-freetext" href="https://github.com/Normation/rudder-agent/blob/branches/rudder/3.0/share/commands/agent-enable#L15">https://github.com/Normation/rudder-agent/blob/branches/rudder/3.0/share/commands/agent-enable#L15</a>
and
<a class="moz-txt-link-freetext" href="https://github.com/Normation/rudder-agent/blob/branches/rudder/3.0/share/commands/agent-reinit#L9">https://github.com/Normation/rudder-agent/blob/branches/rudder/3.0/share/commands/agent-reinit#L9</a>).<br>
<br>
<blockquote cite="mid:547449AE.9020805@normation.com" type="cite">
<blockquote
cite="mid:CAO=cbAVH_2ChHWZhy8jfO2ucpRm7PcmJLQ-Ro1=fNhPXW8pEjQ@mail.gmail.com"
type="cite">
<div dir="ltr">- standardize common flags for each script so
external contributions will be homogeneous (-d for debug, -v
for verbose, etc)<br>
</div>
</blockquote>
<br>
I agree that it is a good thing to standardize the meaning of some
flag.<br>
However, I think it's too burdensome to guarantee their existence
on every sub-command.<br>
</blockquote>
<br>
Without actually guaranteeing they exist, we can still define the
standard so that other authors know about it, and avoid using those
flags for other things. I suggest documenting this in the README
file in the git repo, and providing a simple template for new tasks
that includes the minimal skeleton: @description tag, getopts for
-v/-d/etc.<br>
<br>
Jonathan<br>
</body>
</html>