← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
path: root/render.sh
diff options
context:
space:
mode:
authorr4tss <[email protected]>2021-05-11 14:58:30 +0200
committerr4tss <[email protected]>2021-05-11 14:58:30 +0200
commit4fc36091d6ff51ab3fe858a9070cf8e2e1455be9 (patch)
treed62c8e01bd42c9c692aa8684a3e2419ba7938f68 /render.sh
parent37c22e7545655a6b8169279a085d15a38cfa05f9 (diff)
idk
Diffstat (limited to 'render.sh')
-rwxr-xr-xrender.sh22
1 files changed, 14 insertions, 8 deletions
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++))