diff options
| author | ars <asav1410@gmail.com> | 2020-07-23 18:23:05 +0100 | 
|---|---|---|
| committer | ars <asav1410@gmail.com> | 2020-07-23 18:23:05 +0100 | 
| commit | a62d0aa88631cf9ad5ca1441b7ba6a633bf711f3 (patch) | |
| tree | a90b57b2c146ca7dc611cbc1a672f8323a557546 | |
| parent | 8f2e371464a9af99d8878e39890c085abcceeaa6 (diff) | |
Add source option
| -rwxr-xr-x | livetimes.sh | 4 | 
1 files changed, 3 insertions, 1 deletions
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  | 
