pkgsrc-Users archive

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

Re: TOOL_DEPENDS or DEPENDS for configure requiring bash



    Date:        Mon, 11 Jul 2022 13:40:36 +0200
    From:        Martin Husemann <martin%duskware.de@localhost>
    Message-ID:  <20220711114036.GA19638%mail.duskware.de@localhost>

  | Which "sh" is that? Artihmetik expansion not working in any posix-ish
  | shell would be very strange...

Depends upon the expression and the shell - but for $(()) anything legit
that bash can do, NetBSD's sh can do ... but bash also parses and executes
some nonsense (like $(( 1+++1 ))  which it interprets as $(( 1 + ( +( +1 ) ) ))
for backward compat reasons from when support for ++ was added.

However POSIX doesn't require several operators (like ++) to be implemented,
and not all shells do (dash doesn't for example).

But:

  | Can you quote the exact statement that does not work?

Yes, I don't use git (ever) so don't touch pkgsrc-wip so I can't
look at the script myself.   It is perhaps more likely that some other
bashism is in the script than crazy arithmetic.

kre



Home | Main Index | Thread Index | Old Index