From 0be391f1cf7ff18758bd53d5dc0302868207987b Mon Sep 17 00:00:00 2001 From: Olaf Bohlen <olbohlen@eenfach.de> Date: Mon, 02 Jan 2023 14:54:58 +0100 Subject: [PATCH] cosmetics continue --- receipt-processor.ksh | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/receipt-processor.ksh b/receipt-processor.ksh index 1d865fe..57fc264 100644 --- a/receipt-processor.ksh +++ b/receipt-processor.ksh @@ -81,6 +81,7 @@ # list up that we fetch needed ingredients printf "Fetching ingredients from receipt:\n" + printf "----------------------------------\n" i=0 while [ ${i} -lt ${num_in} ]; do in_name=$( echo "${receipt}" | jq -r .spec.ingredients[${i}].name ) @@ -92,7 +93,7 @@ if [ "x${in_remarks}" != "xnull" ]; then printf " (%s)" "${in_remarks}" fi - printf "\n" + printf "\n\n" sleep 1 i=$(( ${i} + 1 )) done @@ -107,13 +108,14 @@ # now let's iterate over that printf "\n\nProcessing the instructions:\n" + printf "----------------------------\n" i=1 - while [ ${i} -lt ${num_steps} ]; do + while [ ${i} -le ${num_steps} ]; do instruction=$( echo "${receipt}" | jq '.spec.steps[] | select(.order == '${i}') | { instruction } | join (" ")' ) printf "Step %i/%i: %s..." ${i} ${num_steps} "${instruction}" sleep $(( ${RANDOM} % 6 + 1 )) - printf "done\n" + printf "done\n\n" sleep 1 i=$(( ${i} + 1 )) done -- Gitblit v1.9.3