[meta-freescale] [PATCH][fsl-community-bsp-base] setup-environment: check script has been sourced
Otavio Salvador
otavio at ossystems.com.br
Fri Jul 11 08:24:53 PDT 2014
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.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
More information about the meta-freescale
mailing list