From a187a84020f8763fa2e5e57e1a98b3ce3f488398 Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Wed, 10 Jan 2024 04:21:59 +0300 Subject: [PATCH] fix: normalizer logs --- pipeline.sh | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/pipeline.sh b/pipeline.sh index ba25d7be7..04ba4239d 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -23,16 +23,24 @@ IO=".eoc/phi/app.phi" I=".eoc/phi/app.bk.phi" mv "$IO" "$I" stack run normalize-phi < "$I" > "$IO" \ - || printf "\n\nNormalizer failed" \ - && printf "\n\n* EO Expression\n\n" \ - && cat app.eo \ - && printf "\n\n* Phi Expression\n\n" \ - && cat "$I" \ - && printf "\n\n* Error\n\n" \ - && cat "$IO" \ - && exit 1 - -printf "Normalizer succeeded" + || { + printf "\n\nNormalizer failed" + printf "\n\n* EO expression:\n\n" + cat app.eo + printf "\n\n* Phi expression:\n\n" + cat "$I" + printf "\n\n* Error:\n\n" + cat "$IO" + exit 1 + } + +printf "\n\nNormalizer succeeded!\n\n" +printf "\n\n* Phi expression:\n\n" +cat "$I" +printf "\n\n* Normalized Phi expression:\n\n" +cat "$IO" +printf "\n\n* Diff:\n\n" +diff "$I" "$IO" eo unphi