From a62d0aa88631cf9ad5ca1441b7ba6a633bf711f3 Mon Sep 17 00:00:00 2001 From: ars Date: Thu, 23 Jul 2020 18:23:05 +0100 Subject: Add source option --- livetimes.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/livetimes.sh b/livetimes.sh index 4bcfa27..bd5f0e8 100755 --- a/livetimes.sh +++ b/livetimes.sh @@ -1,5 +1,4 @@ #!/bin/bash -# TODO: add failure check for each cURL read stop @@ -128,6 +127,9 @@ services=$(echo $timetables | jq '.timetables[].service_number') if [ "$stop" == "-h" ] || [ "$stop" == "--help" ] || [[ -z "${stop// }" ]]; then _help # checks if input pattern matches a 4 digit bus stop code +elif [ ${stop,,} == "source" ]; then + echo "https://www.blatech.co.uk/ars/liberty-bus-live-times" + exit 0 elif [[ "$stop" =~ ^-?[0-9]+$ ]] && [ $(echo ${#stop} == 4) ]; then _liveresult # checks if input is a valid bus route -- cgit v1.2.3