<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 20, 2018 at 8:28 AM, Fabio Niephaus <span dir="ltr"><<a href="mailto:lists@fniephaus.com" target="_blank">lists@fniephaus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr">Hi Tobias,<br><br><div class="gmail_quote"><div dir="ltr">On Tue, Mar 20, 2018 at 2:16 PM Tobias Pape <<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>
Hi all, especially Eliot<br>
<br>
I accidentally committed an experiment but I think it's worthwile.<br>
<br>
Look at <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/build.linux32x86/squeak.cog.spur/build.debug/mvm#L36" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/blob/Cog/build.linux32x86/<wbr>squeak.cog.spur/build.debug/<wbr>mvm#L36</a><br>
<br>
I replaced<br>
        make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$<wbr>INSTALLDIR 2>&1 | tee LOG<br>
with<br>
        exec \<br>
            script -f -q -e -c \<br>
            "make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$<wbr>INSTALLDIR" \<br>
            >(sed "s/\x1B\[\([0-9]\{1,2\}\(;[0-<wbr>9]\{1,2\}\)\?\)\?[mGK]//g" > LOG)<br>
<br>
Which amounts to nearly the same result (compile outputs to terminal and to LOGfile)<br>
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).<br>
<br>
I had this for quite some weeks now and it works fine (no extra deps, its all (script, sed) there on unixes)<br>
<br>
What do you all think?<br></blockquote><div><br></div><div>The purpose (preserving colors) is great, the readability of the script not so much IMHO.</div><div>Could this magic script be extracted into some more meaningful helper function like `<wbr>runAndLogWhilePreservingColors<wbr>`? A brief explanation of how the magic works could also be helpful. I literally stopped trying to parse the script in my head after seeing all the flags for `script`.</div></div></div></blockquote><div><br></div><div>+1</div><div><br></div><div>BTW, neither .travis_helpers.sh nor .travis_install.sh begin with #!/bin/bash</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>Best,</div><div>Fabio</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
Best regards<br>
        -Tobias<br></blockquote></div></div></blockquote></div><div><br></div><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>