From 2840566e294bda5355dbaf36dc07cf6c15c7d20a Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Fri, 8 Jun 2018 14:12:47 +0200 Subject: [PATCH] Improve MACSYMA build script. After typing (todo) or (todoi), wait for the string ") \r" to appear. This signals the end of of a list printed right before reading new input from the console. --- build/build.tcl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/build/build.tcl b/build/build.tcl index 259fb271..9872cc08 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -82,15 +82,16 @@ proc build_macsyma_portion {} { respond "302615" "(load \"libmax;module\")" respond "303351" "(load \"libmax;maxmac\")" expect "307161" - send "(todo)" - expect "(todo)" - sleep 10 - send "(todoi)" - sleep 10 - expect "(todoi)" - sleep 10 - send "(mapcan " - expect "(mapcan " + type "(todo)" + expect ") \r" + type "(todoi)" + expect { + ") \r" { + } + "NIL" { + } + } + type "(mapcan " type "#'(lambda (x) (cond ((not (memq x\r" type "'(SETS TRANSS MTREE TRHOOK EDLM)\r" type ")) (doit x)))) (append todo todoi))"