[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFC] Remove massbuild bashisms



On Tue, Aug 28, 2007 at 12:30:35PM -0400, Branden Robinson wrote:
> On Tue, Aug 28, 2007 at 05:24:48PM +0200, Jérémy Bobbio wrote:
> > Hi!
> > 
> > Attached is a patch that will remove bashisms in the massbuild script.
> [...]
> > I don't have a huge personal preference, although I like the idea of
> > having POSIX compliant shell scripts.  If there's no opposition, I'll
> > commit it in a few days.
> [...]
> > +	BDEP_SOURCE_PREFIX=$(echo "$BDEP_SOURCE" | head -c 1)
> 
> That's a really expensive way of doing that.  I recommend POSIX parameter
> expansion, which will avoid forks and pipes.
> 
> BDEP_SOURCE_PREFIX=${BDEP_SOURCE#?}

Thanks for helping me improve my shell-fu. :)

Patch localy amended.

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   

Attachment: signature.asc
Description: Digital signature


Reply to: