[meta-freescale] [PATCH][fsl-community-bsp-base] setup-environment: conditionally show MACHINEs

Daiane Angolini daiane.list at gmail.com
Fri Jul 11 06:37:26 PDT 2014


On Wed, Jul 9, 2014 at 12:26 PM, Trevor Woerner
<trevor.woerner at linaro.org> wrote:
> Before trying to show the supported MACHINEs, make sure they can be found,
> otherwise the error message to "ls" will be displayed (which users might find
> confusing).

Good catch!


ACK

Daiane
>
> Tested on: bash, dash, zsh.
>
> Signed-off-by: Trevor Woerner <trevor.woerner at linaro.org>
> ---
>  setup-environment | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/setup-environment b/setup-environment
> index d3f89ce..b8787ba 100755
> --- a/setup-environment
> +++ b/setup-environment
> @@ -47,13 +47,18 @@ usage()
>      <build-dir>: specifies the build directory location (required)
>
>  If undefined, this script will set \$MACHINE to 'imx6qsabresd'.
> +"
>
> +    ls sources/*/conf/machine/*.conf > /dev/null 2>&1
> +    if [ $? -eq 0 ]; then
> +        echo -e "
>  Supported machines: `echo; ls sources/*/conf/machine/*.conf \
>  | sed s/\.conf//g | sed -r 's/^.+\///' | xargs -I% echo -e "\t%"`
>
>  To build for a machine listed above, run this script as:
>  MACHINE=<machine> source $PROGNAME <build-dir>
>  "
> +    fi
>  }
>
>  clean_up()
> --
> 2.0.0.5.gbce14aa
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale


More information about the meta-freescale mailing list