shrink main loop to the absolute necessary and display large logo at startup
This commit is contained in:
parent
f7fb1be540
commit
e714a06e04
43
departure.sh
43
departure.sh
|
@ -5,18 +5,18 @@
|
||||||
STATION_ID[0]="18"
|
STATION_ID[0]="18"
|
||||||
STATION_ID[1]="202"
|
STATION_ID[1]="202"
|
||||||
|
|
||||||
LOGO_L[ 0]="\\t\\t████████████████████████████████████████████████\\n"
|
LOGO_L[ 0]="\\t\\t████████████████████████████████████████████████"
|
||||||
LOGO_L[ 1]="\\t\\t██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██\\n"
|
LOGO_L[ 1]="\\t\\t██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██"
|
||||||
LOGO_L[ 2]="\\t\\t██▒▒████████████████████████████████████████▒▒██\\n"
|
LOGO_L[ 2]="\\t\\t██▒▒████████████████████████████████████████▒▒██"
|
||||||
LOGO_L[ 3]="\\t\\t██▒▒██████████▒▒██▒▒████████████▒▒██▒▒██████▒▒██\\n"
|
LOGO_L[ 3]="\\t\\t██▒▒██████████▒▒██▒▒████████████▒▒██▒▒██████▒▒██"
|
||||||
LOGO_L[ 4]="\\t\\t██▒▒████▒▒▒▒▒▒████▒▒██████▒▒▒▒▒▒████▒▒██████▒▒██\\n"
|
LOGO_L[ 4]="\\t\\t██▒▒████▒▒▒▒▒▒████▒▒██████▒▒▒▒▒▒████▒▒██████▒▒██"
|
||||||
LOGO_L[ 5]="\\t\\t██▒▒████▒▒████████████▒▒██▒▒████████████▒▒██▒▒██\\n"
|
LOGO_L[ 5]="\\t\\t██▒▒████▒▒████████████▒▒██▒▒████████████▒▒██▒▒██"
|
||||||
LOGO_L[ 6]="\\t\\t██▒▒████▒▒████████▒▒██▒▒██▒▒████████▒▒██▒▒██▒▒██\\n"
|
LOGO_L[ 6]="\\t\\t██▒▒████▒▒████████▒▒██▒▒██▒▒████████▒▒██▒▒██▒▒██"
|
||||||
LOGO_L[ 7]="\\t\\t██▒▒██████████▒▒██▒▒██▒▒████████▒▒██▒▒██▒▒██▒▒██\\n"
|
LOGO_L[ 7]="\\t\\t██▒▒██████████▒▒██▒▒██▒▒████████▒▒██▒▒██▒▒██▒▒██"
|
||||||
LOGO_L[ 8]="\\t\\t██▒▒██▒▒▒▒▒▒▒▒██▒▒██▒▒██▒▒▒▒▒▒▒▒██▒▒██▒▒████▒▒██\\n"
|
LOGO_L[ 8]="\\t\\t██▒▒██▒▒▒▒▒▒▒▒██▒▒██▒▒██▒▒▒▒▒▒▒▒██▒▒██▒▒████▒▒██"
|
||||||
LOGO_L[ 9]="\\t\\t██▒▒████████████████████████████████████████▒▒██\\n"
|
LOGO_L[ 9]="\\t\\t██▒▒████████████████████████████████████████▒▒██"
|
||||||
LOGO_L[10]="\\t\\t██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██\\n"
|
LOGO_L[10]="\\t\\t██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██"
|
||||||
LOGO_L[11]="\\t\\t████████████████████████████████████████████████\\n"
|
LOGO_L[11]="\\t\\t████████████████████████████████████████████████"
|
||||||
LOGO_L[12]="\\t\\t C H A O S C H E M N I T Z . D E \\n"
|
LOGO_L[12]="\\t\\t C H A O S C H E M N I T Z . D E \\n"
|
||||||
|
|
||||||
LOGO_S[0]="\\t\\t█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ "
|
LOGO_S[0]="\\t\\t█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ "
|
||||||
|
@ -203,14 +203,23 @@ draw_logo_time()
|
||||||
_MYOUTPUT="\\n\\n${LOGO_TIME[0]}\\n${LOGO_TIME[1]}\\n${LOGO_TIME[2]}\\n${LOGO_TIME[3]}\\n${LOGO_TIME[4]}\\n${LOGO_TIME[5]}"
|
_MYOUTPUT="\\n\\n${LOGO_TIME[0]}\\n${LOGO_TIME[1]}\\n${LOGO_TIME[2]}\\n${LOGO_TIME[3]}\\n${LOGO_TIME[4]}\\n${LOGO_TIME[5]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
draw_large_logo()
|
||||||
|
{
|
||||||
|
clear
|
||||||
|
echo -e "\n\n\n\n\n"
|
||||||
|
for ((j=0; j<="${#LOGO_L[*]}"; j++)); do
|
||||||
|
echo -e "${LOGO_L[$j]}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
LOGO_LINES_POSITION=0
|
LOGO_LINES_POSITION=0
|
||||||
STATION_NAME=()
|
STATION_NAME=()
|
||||||
while true; do
|
print_cvag_schedule()
|
||||||
|
{
|
||||||
[ ${#STATION_NAME[*]} -eq 0 ] && get_cvag_station_name STATION_NAME STATION_ID
|
[ ${#STATION_NAME[*]} -eq 0 ] && get_cvag_station_name STATION_NAME STATION_ID
|
||||||
if [ ${#STATION_NAME[*]} -eq 0 ]; then
|
if [ ${#STATION_NAME[*]} -eq 0 ]; then
|
||||||
clear
|
clear
|
||||||
echo -e "\\n\\n\\n\\tService unavailable!"
|
echo -e "\\n\\n\\n\\tService unavailable!"
|
||||||
sleep 10
|
|
||||||
else
|
else
|
||||||
MYOUTPUT=()
|
MYOUTPUT=()
|
||||||
MYOUTPUT[0]="\\n "
|
MYOUTPUT[0]="\\n "
|
||||||
|
@ -247,6 +256,12 @@ while true; do
|
||||||
echo -e "${MYOUTPUT[$j]}"
|
echo -e "${MYOUTPUT[$j]}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
draw_large_logo
|
||||||
|
sleep 5
|
||||||
|
while true; do
|
||||||
|
print_cvag_schedule
|
||||||
sleep 10
|
sleep 10
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue