bug-bash
[Top][All Lists]
Advanced

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

Re: declare a="$b" if $a previously set as array


From: Stephane Chazelas
Subject: Re: declare a="$b" if $a previously set as array
Date: Wed, 10 Dec 2014 11:09:13 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

2014-12-10 10:43:45 +0000, Stephane Chazelas:
[...]
> In particular, it mandates a "local" builtin. So sh scripts that
> use "local" are guaranteed to work in Debian. However note that
> behaviour for "local foo=bar" is unspecified there, so sh
> scripts for Debian should use "local foo; foo=bar" (even those
> POSIX specifies "export foo=bar" (though not clearly enough)).
[...]

Sorry, that's wrong. Debian does allow "local foo=bar"
(https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts),
either it has changed or I was confusing it with LSB, I'm not sure now.
I thought LSB was mandating "local", but can't find a reference
to it either.

-- 
Stephane



reply via email to

[Prev in Thread] Current Thread [Next in Thread]