Am 04.07.2018 um 23:46 schrieb Mark Thomas:
On July 4, 2018 9:34:36 PM UTC, Rainer Jung <rainer.j...@kippdata.de> wrote:
Am 04.07.2018 um 23:05 schrieb ma...@apache.org:
Author: markt
Date: Wed Jul 4 21:05:58 2018
New Revision: 1835090
URL: http://svn.apache.org/viewvc?rev=1835090&view=rev
Log:
Consistently use $(...) rather than `...`
The uglyness of shell:
Backticks work in many shells, "$(..)" only in non-ancient shells. Our
scripts all declare that they want to get run by /bin/sh which can be
an
unexpectedly old type of shell.
An example is Solaris 10, where /bin/sh is a very old (original) Bourne
Shell which does not support $(..) and for example also not "export
VAR=VAL" (instead only "VAR=VAL;export VAR").
I am not totally opposed against using newer shell constructs. But the
problem is platform independent shell coding. For some platforms
/bin/sh
in our hashbang header is too old, but for other platforms /bin/bash
might not exist. There's no easy solution if we want to modernize -
except for deprecating platforms or letting users fix the scripts.
So it still might be best to stick to the old compatible constructs,
especially since our scripts are only doing basic stuff (which is
good).
Happy to revert. There were a few places that used $(...) before this change.
I'll switch them to backticks.
I'll look at this tomorrow.
Thanks Mark. I think the only pre-existing case was in the new
makebase.sh, which I didn't yet have the chance to test, but already
expected bashisms. At least I didn't find any "$(" in r1835089 of bin.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org