chiark / gitweb /
Makefile, dot/rcrc: Hack rc(1) profile for Plan 9 compatibility.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 3 May 2018 12:47:21 +0000 (13:47 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 3 May 2018 12:51:53 +0000 (13:51 +0100)
commita3857ab280c3cbd4c97e0e3524fe2be069f7572a
tree6a9e1562f5e4d75c1237be29f9ebab9986321b07
parent9961661f9166cb6cdc617240951b2b091cc99d12
Makefile, dot/rcrc: Hack rc(1) profile for Plan 9 compatibility.

Annoyingly, the native-Linux rc(1) port doesn't accept the same syntax
as Plan 9 From User Space.

  * Plan 9 requires braces around command substitutions, so `{hostname}
    rather than `hostname.

  * Plan 9 doesn't have here-strings, so use echo instead.

  * Plan 9 is pickier about concatenating unset variables, so set them
    empty explicitly.

  * Plan 9 has a bizarre `if not' syntax rather than allowing `else'
    clauses.

This last is the most annoying difference, since the only thing
acceptable to both implementations is to repeat the condition.

Prefer the Plan 9 version throughout, and seddery the script to make the
native port version.  Fortunately they end up in different places;
otherwise we'd be really stuffed.
Makefile
dot/rcrc