[Swan-dev] redirection in swan-install
D. Hugh Redelmeier
hugh at mimosa.com
Sat Mar 8 21:21:06 EET 2014
The script testing/guestbin/swan-install contains the following line:
make module_install 2>&1 >> compile-log.txt
That is a bit odd. The first redirection probably does nothing in normal
cases. It redirects stderr to what stdout was before stdout is
redirected.
A clearer way to get this effect in most cases would be:
make module_install >>compile-log.txt
The result is that compile-log.txt is a confusing and fairly useless
document because it excludes error messages.
Perhaps what was meant was:
make module_install >>compile-log.txt 2>&1
This redirects both stdout and stderr to compile-log.txt.
I'd say that this is an obvious fix EXCEPT that after this change,
error messages no longer go to the console. So the person running the
command has no indication whether the make succeeded.
I'd like the stderr and stdlog to go to the file AND only stderr to go
to the console. Not so easy.
More information about the Swan-dev
mailing list