On 07/07/2012 10:42 PM, Jim Meyering wrote:
> Andy Wingo wrote:
> ...
>> +function massage_git_version() {
>> + local v=$1
>
> Using the "function" and "local" keywords would make this script
> fail for some older shells.
>
With the "function" keyword, even recent ones:
$ dpkg -l dash
...
ii dash 0.5.5.1-7.4 POSIX-compliant shell
$ dash -c 'function foo () { :; }'
dash: Syntax error: "(" unexpected
$ dash -c 'function foo { :; }'
dash: function: not found
Regards,
Stefano
