Re: ./configure script prototype

From: Fernando J. Pereda <ferdy@ferdyx.org>
Date: 2005-11-15 03:32:40
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 <ae@op5.se> 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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Tue Nov 15 03:33:20 2005

This archive was generated by hypermail 2.1.8 : 2005-11-15 03:33:25 EST