From e683bdfa76a5c2c54422a6bd2934b133d77ba610 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Sun, 3 Oct 2021 19:19:51 +0000 Subject: [PATCH] mk: provide a mechanism to default to `rc` For cross-compiling plan9 from Unix, provide a way to force `mk` to use `rc` instead of `sh` without setting `MKSHELL` in individual `mkfile`s. If the environment variable `FORCERCFORMK` is set, `mk` will default to using `rc`, not `sh`. Signed-off-by: Dan Cross --- src/cmd/mk/shell.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmd/mk/shell.c b/src/cmd/mk/shell.c index 8c15ec21..3e10146f 100644 --- a/src/cmd/mk/shell.c +++ b/src/cmd/mk/shell.c @@ -41,6 +41,8 @@ setshell(Word *w) void initshell(void) { + if(getenv("FORCERCFORMK") != nil) + shelldefault = &rcshell; shellcmd = stow(shelldefault->name); shellt = shelldefault; setvar("MKSHELL", shellcmd);