[meta-freescale] [PATCH][fsl-community-bsp-base] setup-environment: check script has been sourced

Daiane Angolini daiane.list at gmail.com
Fri Jul 11 08:46:28 PDT 2014


On Fri, Jul 11, 2014 at 12:24 PM, Otavio Salvador
<otavio at ossystems.com.br> wrote:
> On Fri, Jul 11, 2014 at 10:28 AM, Daiane Angolini <daiane.list at gmail.com> wrote:
>> On Wed, Jul 9, 2014 at 12:25 PM, Trevor Woerner
>> <trevor.woerner at linaro.org> wrote:
> ...
>>> @@ -55,6 +72,10 @@ ARGS=$(getopt --options $SHORTOPTS  \
>>>    --longoptions $LONGOPTS --name $PROGNAME -- "$@" )
>>>  # Print the usage menu if invalid options are specified
>>>  if [ $? != 0 -o $# -lt 1 ]; then
>>> +   if [ $INVOKEGOOD = 0 ]; then
>>> +       echo "Error: This script needs to be sourced. Please run as '. $PROGNAME'"
>>
>> I hate using dot "." in documentations or log messages (in fact I
>> don´t use it any more in my command lines) because I cannot *see* it
>> when I look to the log/doc line.
>>
>> Do you see any problem in the use of "source" instead of ". " (dot +
>> space) as the suggested command line?
>>
>> Other than that I don´t see any technical problem with the patch.
>
> The suggested line ought to be using "." as this is POSIX compliant.
> "source" is Bash specific.


I cannot accept that the "POSIX compliant" is the final argument in
this discussion.

I mean, I´m not saying you are wrong. I´m saying I still cannot see
the dot even being POSIX compliant!

I would suggest to use a glitter shining intermittent red and pink
dot, instead. However, it´s too girly even to me.

How to highlight the user that *does not know* how to use the tool
(otherwise the log is useless) to see the dot?

And, this points an error in our README / Doc files:

https://github.com/Freescale/fsl-community-bsp-platform/blob/daisy/README#L22

https://github.com/Freescale/Documentation/blob/master/user-guide/source/nsteps.rst
(section 4)


However:
https://github.com/Freescale/fsl-community-bsp-base/blob/master/README#L17


Daiane


More information about the meta-freescale mailing list