Subject: Re: build.sh defaults file
To: None <sjg@crufty.net>
From: None <cgd@broadcom.com>
List: tech-toolchain
Date: 02/06/2003 16:24:51
At Thu, 6 Feb 2003 23:38:39 +0000 (UTC), "Simon J. Gerraty" wrote:
> [ ... ]  Having build.sh
> do
> 
> rc=${0%/*}/.build.conf
> [ -s $rc ] && . $rc
> 
> doesn't seem like a bad idea.

well...  8-)

(1) that's not portable sh (though i don't know if it's within
    build.sh's goals to be portable to shells, e.g., solaris /bin/sh,
    which don't support that 8-).

    Of course, you could do similar stuff that works if that's not
    OK.  8-)

(2) if you're going to put it in the source tree, it's ... lame to
    make it a .file; you want to see it by default.

(3) of course, if you do this, then the config file semantics depends
    on the version of build.sh in question.  i.e., rename shell
    variables and your config files loses, etc.  Creating a fragile
    config file format seems broken.


So, if something like this is going to be done, it should probably
either:

(a) just add arguments, or

(b) be a well-defined and supported syntax, parsed by <something>.


(a) is easily served by a script (like, 2 liner, more if you want to
get fancy!), and (b) seems like way overkill to me.

One could do (a) by having the config file just specify additional
arguments...  but then you get into the whole "well, do i want
variables expanded, and how does that work, and ..." pit.

"punt!"



cgd