bug-texinfo
[Top][All Lists]
Advanced

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

Re: texi2dvi is a bash script, not a Bourne shell script


From: Gavin Smith
Subject: Re: texi2dvi is a bash script, not a Bourne shell script
Date: Wed, 1 Jul 2015 21:50:05 +0100

On 1 July 2015 at 21:43, Gavin Smith <address@hidden> wrote:
>
> I seem to remember there was something wrong about the "local"
> function, but I can't remember what it was.

This test for "local" is flawed:

(
  foo=bar
  test_local () {
    local foo=foo
  }
  test_local >/dev/null 2>&1
  test $foo = bar
) || eval '
local () {
  case $1 in
    *=*) eval "$1";;
  esac
}
'
It appears to assume that "local foo=foo" will assign "foo" to foo if
local doesn't exist, but in fact all it does is print an error
message, and leave foo as was.



reply via email to

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