cosmetics continue

This commit is contained in:
Olaf Bohlen
2023-01-02 14:54:58 +01:00
parent 79e42e3808
commit 0be391f1cf

View File

@@ -81,6 +81,7 @@ while sleep 5; do
# list up that we fetch needed ingredients # list up that we fetch needed ingredients
printf "Fetching ingredients from receipt:\n" printf "Fetching ingredients from receipt:\n"
printf "----------------------------------\n"
i=0 i=0
while [ ${i} -lt ${num_in} ]; do while [ ${i} -lt ${num_in} ]; do
in_name=$( echo "${receipt}" | jq -r .spec.ingredients[${i}].name ) in_name=$( echo "${receipt}" | jq -r .spec.ingredients[${i}].name )
@@ -92,7 +93,7 @@ while sleep 5; do
if [ "x${in_remarks}" != "xnull" ]; then if [ "x${in_remarks}" != "xnull" ]; then
printf " (%s)" "${in_remarks}" printf " (%s)" "${in_remarks}"
fi fi
printf "\n" printf "\n\n"
sleep 1 sleep 1
i=$(( ${i} + 1 )) i=$(( ${i} + 1 ))
done done
@@ -107,13 +108,14 @@ while sleep 5; do
# now let's iterate over that # now let's iterate over that
printf "\n\nProcessing the instructions:\n" printf "\n\nProcessing the instructions:\n"
printf "----------------------------\n"
i=1 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 (" ")' ) instruction=$( echo "${receipt}" | jq '.spec.steps[] | select(.order == '${i}') | { instruction } | join (" ")' )
printf "Step %i/%i: %s..." ${i} ${num_steps} "${instruction}" printf "Step %i/%i: %s..." ${i} ${num_steps} "${instruction}"
sleep $(( ${RANDOM} % 6 + 1 )) sleep $(( ${RANDOM} % 6 + 1 ))
printf "done\n" printf "done\n\n"
sleep 1 sleep 1
i=$(( ${i} + 1 )) i=$(( ${i} + 1 ))
done done