From 4fc36091d6ff51ab3fe858a9070cf8e2e1455be9 Mon Sep 17 00:00:00 2001 From: r4tss <68610647+r4tss@users.noreply.github.com> Date: Tue, 11 May 2021 14:58:30 +0200 Subject: idk --- render.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'render.sh') diff --git a/render.sh b/render.sh index d686f40..80aa5d6 100755 --- a/render.sh +++ b/render.sh @@ -5,13 +5,13 @@ height=0 echo ${distance[1]} -function a { #input format: distance, height, invert - if [ $(echo "$(sed -n $(echo $((W + 1))p) distances) < ($height * 0.75)" | bc) -eq 1 ] +function a { + if [ $(echo "$(sed -n $(echo $((W + 1))p) distances) < ($height)" | bc) -eq 1 ] then b="#" elif [ $H -gt 20 ] then - b="-" + b="/" else b=" " fi @@ -22,14 +22,20 @@ do echo while [ $W -lt 91 ] do - a - if [ $W -eq 90 ] + if [ $H -eq 0 ] then - echo $b + echo -n $W + echo -n " " else - echo -n $b + a + if [ $W -eq 90 ] + then + echo $b + else + echo -n $b + fi + echo -n " " fi - echo -n " " ((W++)) done ((H++)) -- cgit v1.2.3