[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] config.status: minimize use of $tmp
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH 2/2] config.status: minimize use of $tmp |
Date: |
Mon, 30 Aug 2010 19:38:30 +0200 |
User-agent: |
Mutt/1.5.20 (2010-04-22) |
Hi Eric,
* Eric Blake wrote on Mon, Aug 30, 2010 at 06:41:47PM CEST:
> On 08/27/2010 01:24 PM, Eric Blake wrote:
> >- tmp=
> >+ tmp= ac_tmp=
> > trap 'exit_status=$?
> >- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; }&& exit
> >$exit_status
> >+ { test ! -d "${ac_tmp:=$tmp}" || rm -fr "$ac_tmp"; }&& exit $exit_status
>
> And then I promptly used it incorrectly. Per what we just
> documented, we cannot assume that ${a=b} takes effect in the parent
> shell if we are executing a child command like test
I don't follow this. Surely that Posix reference hints at
http://austingroupbugs.net/view.php?id=255
and is meant for assignments *before* commands only, as in for example
ac_tmp=$tmp test ! -d "$ac_tmp"
but not the code above.
Can you help me understand?
Thanks,
Ralf
- [PATCHv2] docs: mention another issue with variable expansion, (continued)
- [PATCHv2] docs: mention another issue with variable expansion, Eric Blake, 2010/08/26
- Re: [PATCHv2] docs: mention another issue with variable expansion, Ralf Wildenhues, 2010/08/27
- Re: [PATCHv2] docs: mention another issue with variable expansion, Eric Blake, 2010/08/27
- [PATCH 0/2] cleanup $tmp usage, Eric Blake, 2010/08/27
- Re: [PATCH 0/2] cleanup $tmp usage, Ralf Wildenhues, 2010/08/27
- Re: [PATCH 0/2] cleanup $tmp usage, Eric Blake, 2010/08/30
- Re: [PATCH 0/2] cleanup $tmp usage, Ralf Wildenhues, 2010/08/30
- Re: [PATCH 0/2] cleanup $tmp usage, Eric Blake, 2010/08/30
- [PATCH 2/2] config.status: minimize use of $tmp, Eric Blake, 2010/08/27
- Re: [PATCH 2/2] config.status: minimize use of $tmp, Eric Blake, 2010/08/30
- Re: [PATCH 2/2] config.status: minimize use of $tmp,
Ralf Wildenhues <=
- Re: [PATCH 2/2] config.status: minimize use of $tmp, Eric Blake, 2010/08/30
- Re: [PATCH 2/2] config.status: minimize use of $tmp, Paul Eggert, 2010/08/30
- [PATCH 1/2] docs: avoid use of $tmp outside of config.status use, Eric Blake, 2010/08/27