[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add --match argument to git-version-gen
From: |
Eric Blake |
Subject: |
Re: add --match argument to git-version-gen |
Date: |
Mon, 09 Jul 2012 04:47:26 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
On 07/07/2012 02:42 PM, Jim Meyering wrote:
>> +function massage_git_version() {
>> + local v=$1
>
> Using the "function" and "local" keywords would make this script
> fail for some older shells. I'd like to remain portable to those.
Not just older shells. POSIX does not require either 'function' or
'local', so they cannot be portably used.
foo() { ...; } is the portable alternative that avoids 'function'.
There is no portable way to do scope limiting of function variables.
I'd like to add either 'local' or 'typeset' to the next version of
POSIX, but Chet Ramey (bash) and David Korn (ksh) have a strongly
divided opinion on whether dynamic (bash) or static (ksh) scoping should
be standardized.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- add --match argument to git-version-gen, Andy Wingo, 2012/07/06
- Re: add --match argument to git-version-gen, Stefano Lattarini, 2012/07/06
- Re: add --match argument to git-version-gen, Andy Wingo, 2012/07/06
- Re: add --match argument to git-version-gen, Jim Meyering, 2012/07/06
- Re: add --match argument to git-version-gen, Andy Wingo, 2012/07/06
- Re: add --match argument to git-version-gen, Jim Meyering, 2012/07/06
- Re: add --match argument to git-version-gen, Andy Wingo, 2012/07/06
- Re: add --match argument to git-version-gen, Jim Meyering, 2012/07/07
- Re: add --match argument to git-version-gen, Stefano Lattarini, 2012/07/07
- Re: add --match argument to git-version-gen,
Eric Blake <=
- Re: add --match argument to git-version-gen, Andy Wingo, 2012/07/10
- Re: add --match argument to git-version-gen, Jim Meyering, 2012/07/11