-
Notifications
You must be signed in to change notification settings - Fork 0
/
canoe
executable file
·69 lines (64 loc) · 1.77 KB
/
canoe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
function printToBuffers () {
case $(( ( $1 + 50 ) % 18 )) in
13|12)
buf[0]=' | _'
buf[1]=' |\\ ( )'
buf[2]=' | \\ ||'
buf[3]=' |__/ \\'
buf[4]=' __________/|\\ | | ________'
buf[5]=' \\ \\_/_|__|_/ /'
buf[6]='~~~`~~~~~~~~~~~~~~~~~~~~~~~~'\''~~~\e[B'
buf[7]='\e[A '
;;
11|10)
buf[0]=' _'
buf[1]=' ( )'
buf[2]=' /\\ ||'
buf[3]=' / \\/ \\'
buf[4]=' _________/ /| | ________'
buf[5]=' \\ /_\\_/_|__|_/ /'
buf[6]='~~~`~~~~~/~~~~~~~~~~~~~~~~~~'\''~~~\e[B'
buf[7]='\e[A / '
;;
9|8)
buf[0]=' _'
buf[1]=' ( )'
buf[2]=' |\\ ||'
buf[3]=' | \\/ |\\'
buf[4]=' __________ |__|_|| ________'
buf[5]=' \\ \\|__|__|_/ /'
buf[6]='~~~`~~~~~~~~~|~~~~~~~~~~~~~~'\''~~~\e[B'
buf[7]='\e[A | '
;;
*)
buf[0]=' _'
buf[1]=' ( )'
buf[2]=' \\____ //'
buf[3]=' \\ / ||'
buf[4]=' __________ \\/ |/ ________'
buf[5]=' \\ \\__/\\__|_/ /'
buf[6]='~~~`~~~~~~~~~~~~~\\~|~~~~~~~~'\''~~~\e[B'
buf[7]='\e[A \\/ '
;;
esac
}
. anim
function preAnim () {
echo -e "\e[u\e[6B\c"
for x in $(seq 0 ${animW})
do
echo -e "~\c"
done
}
#function postFrame () {
# echo -e "\e[u\e[6B\e[$(( $1 + 30 ))C\c"
# for x in $(seq $1 ${animW})
# do
# echo -e "~\c"
# done
#}
function waitBetweenFrames () {
sleep 0.045
}
animate