Andre Poenitz wrote:
> On Mon, Dec 06, 2004 at 12:27:40PM +0000, Angus Leeming wrote:
>> What functionality do we need of bash that the POSIX-standard Bourne
>> shell does not provide? I suspect that we need nothing that we can't get
>> using perfectly standard means.
>
> Certainly. However, there are some cases where the solution is sed code
> that almost nobody can read, let alone fix.
>
> Your recent script to detect the loaded hyphenation packages plays in
> that league.
Actually, the complaint there was that 'grep -A' was a gnu-ism.
> > In fact, it was what prompted the question we are currently
> discussing.
Errr, no it isn't. This thread is all about a modification of common.am:
+$(PCH_FILE): $(PCH_SOURCE)
+ TMPCMD=` echo $(CXXCOMPILE) | sed -e s,\",\',` ; \
+ PATTERN=`echo $(PCH_FLAGS) | sed -e 's,\/,\\\/,'` ; \
+ $${TMPCMD/$$PATTERN} \
Note:
1. sed is used *in addition to* the bash-ism ${TMPCMD/$PATTERN}
2. I defy you to tell me that ${TMPCMD/$PATTERN} is a commonly recognized
idiom.
>> Lars has already demonstrated how he could use
>> sed and echo to get what he wants in this particular case.
>
> I am sure we'll find in every case a non-bash solution.
>
> With the same kind of argument we could use plain C for LyX and require
> only plain TeX for the backend.
Reductio ad absurdum. Playing the same game backwards, we could use
standard-compliant C++ and require the use of only gnu tools. We wouldn't
even need to use automake/autoconf then because they are designed
specifically to work around platform-specific implementations.
--
Angus