[Vm-dev] MVM

Eliot Miranda eliot.miranda at gmail.com
Tue Mar 20 15:32:35 UTC 2018


On Tue, Mar 20, 2018 at 8:28 AM, Fabio Niephaus <lists at fniephaus.com> wrote:

>
> Hi Tobias,
>
> On Tue, Mar 20, 2018 at 2:16 PM Tobias Pape <Das.Linux at gmx.de> wrote:
>
>>
>> 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?
>>
>
> The purpose (preserving colors) is great, the readability of the script
> not so much IMHO.
> Could this magic script be extracted into some more meaningful helper
> function like `runAndLogWhilePreservingColors`? 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`.
>

+1

BTW, neither .travis_helpers.sh nor .travis_install.sh begin with
#!/bin/bash



>
> Best,
> Fabio
>
>
>>
>> Best regards
>>         -Tobias
>>
>
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180320/cddbb2ab/attachment.html>


More information about the Vm-dev mailing list