From ced31d59844813c7a863e2d78676cd494baafac8 Mon Sep 17 00:00:00 2001 From: Asa Venton Date: Tue, 22 Oct 2019 21:04:23 +0100 Subject: Make next bus is tomorrow clearer --- livetimes.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/livetimes.sh b/livetimes.sh index da03c98..1235786 100755 --- a/livetimes.sh +++ b/livetimes.sh @@ -93,7 +93,7 @@ _nextbus() { fi done # if program didn't exit inside for loop then we know the next bus is actually tomorrow in which case we'll return the zeroth item of the array - echo $(echo "Route $stop leaving from $(echo $nextbus | jq -s '.[0].stop_name') at $(echo $nextbus | jq -s '.[0].departure_time')" | sed 's/"//g') + echo $(echo "Route $stop leaving from $(echo $nextbus | jq -s '.[0].stop_name') at $(echo $nextbus | jq -s '.[0].departure_time') tomorrow" | sed 's/"//g') exit 0 } @@ -107,7 +107,7 @@ elif [[ "$stop" =~ ^-?[0-9]+$ ]] && [ $(echo ${#stop} == 4) ]; then # checks if input is a valid bus route elif [[ ${services[@]} =~ ${stop^^} ]]; then _nextbus -elif [[ ${stop,,} == *"bus"* ]] || [[ ${stop,,} == *"station"* ]] || [[ ${stop,,} == *"stand"* ]]; then +elif [[ ${stop,,} == *"bus"* ]] || [[ ${stop,,} == *"stationg"* ]] || [[ ${stop,,} == *"stand"* ]]; then _rejectbusstation else _stopsreturn -- cgit v1.2.3