[Aboriginal] [PATCH] Check the user input about architecture

Rob Landley rob at landley.net
Wed Jun 22 19:53:08 PDT 2011


On 06/21/2011 02:35 AM, Alessio Igor Bogani wrote:
> # HG changeset patch
> # User Alessio Igor Bogani <alessioigorbogani at gmail.com>
> # Date 1308641684 -7200
> # Node ID 67accb5d252602b3b2ad2d0b8aa6fd9a62c74030
> # Parent  d16057658651a27f2c9b99764367475f36285e2e
> Check the user input about architecture
> 
> diff -r d16057658651 -r 67accb5d2526 build.sh
> --- a/build.sh	Sun Jun 19 21:51:42 2011 -0500
> +++ b/build.sh	Tue Jun 21 09:34:44 2011 +0200
> @@ -32,15 +32,20 @@
>  # Start with some housekeeping stuff.  If this script was run with no
>  # arguments, list available architectures out of sources/targets.
>  
> +source sources/utility_functions.sh  || exit 1
> +
> +SUPPORTED_ARCHS=$(ls sources/targets)
> +

Hmmm...  I've avoided sourcing any of the config or functions files
because I wanted this file to stay simple and self-contained.

It _started_ as a very simple wrapper that just called the other stages
in sequence, and conceptually I'd like it to stay that way.
Unfortunately, it's gotten more complex over the years, with dependency
tracking and config symbols.  (I haven't allowed dependency tracking
_within_ build stages, system-image.sh was doing some for a while but I
ripped it back out again to simplify things.  But build.sh checks
tarballs to see if it needs to rebuild stages.)

That said, we don't really need is_in_list here, and that's all the
include is for.  You can just go:

  [ -e "sources/targets/$1" ]

instead.  Could you redo the patch with that?  (Or I can if you prefer...)

Thanks,

Rob

 1308797588.0


More information about the Aboriginal mailing list