chiark / gitweb /
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.