groff
[Top][All Lists]
Advanced

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

Re: [Groff] [PATCH] Use bash for several contrib scripts


From: Colin Watson
Subject: Re: [Groff] [PATCH] Use bash for several contrib scripts
Date: Thu, 2 Jan 2014 14:14:14 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jan 02, 2014 at 03:03:48PM +0100, Steffen Nurpmeso wrote:
> Colin Watson <address@hidden> wrote:
>  |+2014-01-02  Colin Watson  <address@hidden>
>  |+
>  |+     * contrib/eqn2graph/eqn2graph.sh: Use bash rather than sh; $RANDOM
>  |+     is a bashism.
>  |+     * contrib/grap2graph/grap2graph.sh: Likewise.
>  |+     * contrib/pic2graph/pic2graph.sh: Likewise.
> 
> I'd really rather do something like the below instead.

This will amount to $$-$$ on shells that don't support $RANDOM, which
seems rather pointless.  Perhaps just:

  tmp=$d/eqn2graph$${$RANDOM:+-$RANDOM}

then?

> Btw.: interesting that the auto-generated files like `configure'
> simply use $RANDOM, whereas the config.guess and such (i *never*
> used any auto*) do.  Imho it is a bug that the generated scripts
> use /bin/sh but are not compatible to a real /bin/sh.

Good point about configure.

I suppose it isn't a fatal incompatibility, since $RANDOM just expands
to the empty string on other shells and mkdir will probably fail; maybe
we could just leave it alone since the above is really no better than
that.  TBH I think I was trying to placate tools that check for
bashisms.

-- 
Colin Watson                                       address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]