tmk: provide a mechanism to default to `rc` - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit e683bdfa76a5c2c54422a6bd2934b133d77ba610
 (DIR) parent d3ee9f70e4ee00bd12557910c9e3dcc1fabd53c7
 (HTM) Author: Dan Cross <cross@gajendra.net>
       Date:   Sun,  3 Oct 2021 19:19:51 +0000
       
       mk: provide a mechanism to default to `rc`
       
       For cross-compiling plan9 from Unix, provide a way
       tto 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 <cross@gajendra.net>
       
       Diffstat:
         M src/cmd/mk/shell.c                  |       2 ++
       
       1 file changed, 2 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/mk/shell.c b/src/cmd/mk/shell.c
       t@@ -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);