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

Re: bashims in debian/rules

James Troup wrote:
> {} works in Debian's tcsh, zsh, ksh *and* bash.  {} is not some evil
> bash-specific thing.
> > IMO, makefiles that use bashims should put SHELL=/bin/bash at top
> > them, but most packages just use one bashim: curly brackets in file
> > names (like debian/{postinst,prerm}).  
> Can we at least do
> SHELL= `which bash`
> instead of assuming it's in /bin?  I retract my suggestion earlier
> about setting $SHELL because make ignores it. (duh)
> > Then the better solution will be to simply rewrite the line to
> > remove it.
> I'm very unhappy about munging my debian/rules files for a brain dead
> cross-compilation environment.
> (And BTW I *really* hope you don't want me to ``fix'' the $()
> posixisms in my debian/rules files, which ``break'' Solaris' so-called
> /bin/sh)

In effect, $SHELL is never taken from environment but can be given as
command line argument:
$ make SHELL=/bin/bash

So I can change my dpkg-buildpackage to pass it to debian/rules.  
No more problem, I hope.

Anyway, putting a SHELL=/bin/bash (or whatever shell that understand your
commands syntax) could be better in term of portability (to other systems
than Linux, like future Debian/Solaris in progress ;-) ).

Maybe we should not use to many different shells but only /bin/sh and
/bin/bash as a replacement when non basic syntax is required.


 Eric Delaunay                 | "La guerre justifie l'existence des militaires.
 delaunay@lix.polytechnique.fr | En les supprimant." Henri Jeanson (1900-1970)

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: