Login  Register

MVM

Posted by Tobias Pape on Mar 20, 2018; 1:16pm
URL: https://forum.world.st/MVM-tp5071291.html

 
Hi all, especially Eliot

I accidentally committed an experiment but I think it's worthwile.

Look at https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/build.linux32x86/squeak.cog.spur/build.debug/mvm#L36

I replaced
        make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
with
        exec \
            script -f -q -e -c \
            "make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR" \
            >(sed "s/\x1B\[\([0-9]\{1,2\}\(;[0-9]\{1,2\}\)\?\)\?[mGK]//g" > LOG)

Which amounts to nearly the same result (compile outputs to terminal and to LOGfile)
but the script do not see the redirection. The idea is to preserve Color output for terminal and travis (because it is actually really useful) but strip all Ansi stuff for the LOG file (hence the sed script).

I had this for quite some weeks now and it works fine (no extra deps, its all (script, sed) there on unixes)

What do you all think?

Best regards
        -Tobias