live-build/functions
Lyndon Brown c54cc2c497 echo: really ensure log messages go to stdout
all echo helpers are used as logging functions with output to go to the
terminal. when used in functions that are designed to return a string
though the message printed would get incorrectly captured.

the previous fix done in e3a987d977 was
stupidly flawed; somehow my testing led me to mistakenly believe that
was adequate, but retesting proves that it was not.

here we create a new FD #3 linked to stdout to output the messages on,
which testing shows works as I had actually intended it.

e.g. here:
```
Foo () { if [ "$1" = "a" ]; then printf "foo\n"; else printf "error\n"; fi; }
```

we get:
```
~$ Foo a
foo
~$ Foo b
error
~$ XX="$(Foo a)"
~$ echo "${XX}"
foo
~$ XX="$(Foo b)"
~$ echo "${XX}"
error
```

and as demonstrated, "error" got incorrectly captured by in the variable

whereas here:
```
exec 3>&1
Foo () { if [ "$1" = "a" ]; then printf "foo\n"; else printf "error\n" >&3; fi; }
```

it is different in the last case:
```
~$ XX="$(Foo b)"
error
~$ echo "${XX}"

```

the error successfully makes it to the terminal, and the variable is an
empty string (with a newline automatically printed).

Gbp-Dch: Short
2020-03-13 13:50:35 +00:00
..
aliases.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
architectures.sh Revert "Test for executables: replace 'which' with more robust 'command -v'" 2020-03-12 12:32:26 +00:00
arguments.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
bootloaders.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
breakpoints.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
cache.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
chroot.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
chroot_bind_path.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
color.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
common.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
conffile.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
configuration.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
defaults.sh Revert "Test for executables: replace 'which' with more robust 'command -v'" 2020-03-12 12:32:26 +00:00
echo.sh echo: really ensure log messages go to stdout 2020-03-13 13:50:35 +00:00
exit.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
firmwarelists.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
help.sh "Live Systems" -> "Debian Live" 2020-03-11 15:23:31 +00:00
init.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
lockfile.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
losetup.sh Revert "Test for executables: replace 'which' with more robust 'command -v'" 2020-03-12 12:32:26 +00:00
man.sh Revert "Test for executables: replace 'which' with more robust 'command -v'" 2020-03-12 12:32:26 +00:00
packagelists.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
packages.sh Revert "Test for executables: replace 'which' with more robust 'command -v'" 2020-03-12 12:32:26 +00:00
sourcelist.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
stagefile.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
usage.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00
wrapper.sh amend copyright & licensing blocks 2020-03-11 13:51:19 +00:00