From: Andreas Ericsson <hidden> Date: 2016-06-15 22:42:11
I've started writing up a configuration script to move some of the logic
out of the Makefile and make it a bit easier to enable/disable certain
stuff.
I'm not exactly fluent in what sh flavours accept what syntax and the
uname -m output is a bit of a mystery for some architectures (PowerPC,
notably) so the SHA1 method selection stuff might not work.
Thoughts? Comments? Patches?
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
From: Andreas Ericsson <hidden> Date: 2016-06-15 22:42:11
Andreas Ericsson wrote:
I've started writing up a configuration script to move some of the logic
out of the Makefile and make it a bit easier to enable/disable certain
stuff.
I'm not exactly fluent in what sh flavours accept what syntax and the
uname -m output is a bit of a mystery for some architectures (PowerPC,
notably) so the SHA1 method selection stuff might not work.
Thoughts? Comments? Patches?
Attachments? ;)
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
From: Petr Baudis <hidden> Date: 2016-06-15 22:42:11
Dear diary, on Mon, Nov 14, 2005 at 01:18:52PM CET, I got a letter
where Andreas Ericsson [off-list ref] said that...
--prefix=*)
prefix=${1##*=}
Aren't those heavy bashisms?
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
From: Andreas Ericsson <hidden> Date: 2016-06-15 22:42:11
Petr Baudis wrote:
Dear diary, on Mon, Nov 14, 2005 at 01:18:52PM CET, I got a letter
where Andreas Ericsson [off-list ref] said that...
quoted
--prefix=*)
prefix=${1##*=}
Aren't those heavy bashisms?
Dunno. I only know bash-scripting, really. I'll replace them with some
sed thing instead.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
From: Andreas Ericsson <hidden> Date: 2016-06-15 22:42:11
Chris Wedgwood wrote:
On Mon, Nov 14, 2005 at 03:32:13PM +0100, Andreas Ericsson wrote:
quoted
Dunno. I only know bash-scripting, really. I'll replace them with
some sed thing instead.
For some people /bin/sh != /bin/bash so you probably want "!/bin/bash"
instead.
Ach no. The configure script really needs to be portable. POSIX (or SUS
or some such) define a minimum syntax that any shell must support when
invoked as /bin/sh.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
From: Fernando J. Pereda <hidden> Date: 2016-06-15 22:42:11
On Mon, Nov 14, 2005 at 02:29:56PM +0100, Petr Baudis wrote:
| Dear diary, on Mon, Nov 14, 2005 at 01:18:52PM CET, I got a letter
| where Andreas Ericsson [off-list ref] said that...
| > --prefix=*)
| > prefix=${1##*=}
|
| Aren't those heavy bashisms?
As far as I know, it should be supported by a POSIX 'sh'[1]:
---8<---
${parameter##word}
Remove Largest Prefix Pattern. The word shall be expanded to produce a
pattern. The parameter expansion shall then result in parameter, with
the largest portion of the prefix matched by the pattern deleted.
---8<---
Whether other shells support it or not... I don't know.
Cheers,
Ferdy
[1] http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
--
Fernando J. Pereda Garcimartin
Gentoo Developer (Alpha,net-mail,mutt,git)
20BB BDC3 761A 4781 E6ED ED0B 0A48 5B0C 60BD 28D4
From: Chris Wedgwood <hidden> Date: 2016-06-15 22:42:11
On Mon, Nov 14, 2005 at 05:11:58PM +0100, Andreas Ericsson wrote:
Ach no. The configure script really needs to be portable. POSIX (or
SUS or some such) define a minimum syntax that any shell must
support when invoked as /bin/sh.
Then bashism need to go away and it should be test with
dash/ash/whatever.
From: Joel Becker <hidden> Date: 2016-06-15 22:42:11
On Mon, Nov 14, 2005 at 02:29:56PM +0100, Petr Baudis wrote:
Dear diary, on Mon, Nov 14, 2005 at 01:18:52PM CET, I got a letter
where Andreas Ericsson [off-list ref] said that...
quoted
--prefix=*)
prefix=${1##*=}
${i# and ${i% are POSIX, iirc.
Joel
--
Life's Little Instruction Book #197
"Don't forget, a person's greatest emotional need is to
feel appreciated."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
On Mon, Nov 14, 2005 at 02:29:56PM +0100, Petr Baudis wrote:
quoted
Dear diary, on Mon, Nov 14, 2005 at 01:18:52PM CET, I got a letter
where Andreas Ericsson [off-list ref] said that...
quoted
--prefix=*)
prefix=${1##*=}
${i# and ${i% are POSIX, iirc.
They may be in POSIX, but they sure as h*ll aren't portable.
There's a _lot_ of machines out there that don't do POSIX, just because
those "newfangled" things are so complicated.
Also, even in POSIX, there's tons of different substandards, and you might
follow one but not the other.
Finally, even if somebody is certified, they can very well be certified
with "exceptions", so if they claim POSIX it doesn't necessarily mean that
they follow all of it.
If you want to do a "configure" script (and I'm not sure it's worth it),
you should cater to the lowest common denominator for it to be meaningful.
What the hell that would be, I have no idea, since if you ever want to run
on native Windows, it won't even be traditional shell. But traditional
shell is at least a lot closer to that lowest common denominator than
POSIX shell is.
That said, most of those ${var...} sequences definitely _are_ very
traditional, and for all I know, ## may be too.
Linus
From: Joel Becker <hidden> Date: 2016-06-15 22:42:11
On Mon, Nov 14, 2005 at 10:39:26AM -0800, Linus Torvalds wrote:
quoted
${i# and ${i% are POSIX, iirc.
They may be in POSIX, but they sure as h*ll aren't portable.
By POSIX I meant POSIX shell, which is ksh. That's available on
just about all modern non-free Unices, and we all know bash and zsh are
compatible with it.
But I had no intention of arguing how portable POSIX is, I was
just trying to describe the minimum breadth of support. My personal
experience is that these particular variable forms have worked on Linux,
Solaris, AIX, Ultrix, IRIX, and the BSDs for, I dunno, eight to ten
years or so.
That said, $(echo | sed), or `echo | sed` for even more
backwards portability (I bet $() is about as portable as ${i%}), can be
used to replace the ${i%} forms.
Joel
--
"I always thought the hardest questions were those I could not answer.
Now I know they are the ones I can never ask."
- Charlie Watkins
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
From: Andreas Ericsson <hidden> Date: 2016-06-15 22:42:11
Linus Torvalds wrote:
On Mon, 14 Nov 2005, Joel Becker wrote:
quoted
On Mon, Nov 14, 2005 at 02:29:56PM +0100, Petr Baudis wrote:
quoted
Dear diary, on Mon, Nov 14, 2005 at 01:18:52PM CET, I got a letter
where Andreas Ericsson [off-list ref] said that...
quoted
--prefix=*)
prefix=${1##*=}
${i# and ${i% are POSIX, iirc.
They may be in POSIX, but they sure as h*ll aren't portable.
A bit funny really. I've already said I'll change them to some sed
thing, so the last 16 emails on this thread have been purely academic. I
guess more people than me are bored by mondays.
If you want to do a "configure" script (and I'm not sure it's worth it),
Perhaps not. I was under the impression that Junio was for it to
simplify the possible move of binaries to GIT_EXEC_PATH.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231