Re: pipefail doesn't work on NetBSD or FreeBSD

2018-10-13 Thread Gary E. Miller via devel
Yo Hal! On Sat, 13 Oct 2018 14:16:46 -0700 Hal Murray wrote: > > I see no 'export' in your example. > > sh-4.4$ export foo=3 > sh-4.4$ echo $foo > 3 > sh-4.4$ (foo=4; echo $foo) > 4 > sh-4.4$ echo $foo > 3 > sh-4.4$ Now I see export, but not the test I wanted: $ export foo=3 $ (export foo=

Re: pipefail doesn't work on NetBSD or FreeBSD

2018-10-13 Thread Hal Murray via devel
> I see no 'export' in your example. sh-4.4$ export foo=3 sh-4.4$ echo $foo 3 sh-4.4$ (foo=4; echo $foo) 4 sh-4.4$ echo $foo 3 sh-4.4$ -- These are my opinions. I hate spam. ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/

Re: pipefail doesn't work on NetBSD or FreeBSD

2018-10-13 Thread Gary E. Miller via devel
Yo Hal! On Sat, 13 Oct 2018 13:56:39 -0700 Hal Murray wrote: > > Maybe: export FOO=xx ?? > > I tried it. It goes in, but the old value gets restored after the ) > We need a shell wizard. > > sh-4.4$ foo=3 > sh-4.4$ (echo $foo) > 3 > sh-4.4$ (foo=4; echo $foo) > 4 > sh-4.4$ echo $foo > 3 > s

Re: pipefail doesn't work on NetBSD or FreeBSD

2018-10-13 Thread Hal Murray via devel
> Maybe: export FOO=xx ?? I tried it. It goes in, but the old value gets restored after the ) We need a shell wizard. sh-4.4$ foo=3 sh-4.4$ (echo $foo) 3 sh-4.4$ (foo=4; echo $foo) 4 sh-4.4$ echo $foo 3 sh-4.4$ -- These are my opinions. I hate spam. __

Re: pipefail doesn't work on NetBSD or FreeBSD

2018-10-13 Thread Gary E. Miller via devel
Yo Hal! On Sat, 13 Oct 2018 13:36:46 -0700 Hal Murray wrote: > >> Can we do what we need with ()s? > > > I have no idea. I have not used anything but bash for decades. But > > it looks promising. If you can test then you or I can change the > > code. > > I tried it. FOO=xx inside () ge

Re: pipefail doesn't work on NetBSD or FreeBSD

2018-10-13 Thread Hal Murray via devel
>> Can we do what we need with ()s? > I have no idea. I have not used anything but bash for decades. But > it looks promising. If you can test then you or I can change the code. I tried it. FOO=xx inside () gets dropped after the ) Maybe we can make a function that returns what we want, but

Re: pipefail doesn't work on NetBSD or FreeBSD

2018-10-13 Thread Gary E. Miller via devel
Yo Hal! On Sat, 13 Oct 2018 12:47:47 -0700 Hal Murray wrote: > > ./waf configure --out=$DIR $2 2>&1 | tee$DIR/test.log > > The scripts run something (./waf configure in this case), and put > > the output into a pipe to log it. > > > Then next, there is a need to see if any part of the p

Re: pipefail doesn't work on NetBSD or FreeBSD

2018-10-13 Thread Hal Murray via devel
> ./waf configure --out=$DIR $2 2>&1 | tee$DIR/test.log > The scripts run something (./waf configure in this case), and put the output > into a pipe to log it. > Then next, there is a need to see if any part of the pipeling failed. But / > bin/sh on *BSD only reports if the last part of t

Re: pipefail doesn't work on NetBSD or FreeBSD

2018-10-13 Thread Gary E. Miller via devel
Yo Hal! On Fri, 12 Oct 2018 21:53:30 -0700 Hal Murray via devel wrote: > Context is de-bashing tests/option-tester.sh and > tests/python3-tester.sh Ouch. That is supposed to be the way to de-bash on *BSD. > FreeBSD 11.1-RELEASE-p4 (GENERIC) #0: Tue Nov 14 06:12:40 UTC 2017 > > /bin/sh > $ se