summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsa Venton <asav1410@gmail.com>2020-10-31 05:35:37 +0000
committerAsa Venton <asav1410@gmail.com>2020-10-31 05:35:37 +0000
commit6b2fe83d7d8ff6567ab8799afb7fdd97dc723866 (patch)
tree923e75290c49688d0120dd389d46dbe895e86340
parent2c568fc74a819849620f8fbe59e181ce12382b44 (diff)
Fix comparison operators in input validation.
-rwxr-xr-xflightquery.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/flightquery.sh b/flightquery.sh
index 65b9e03..5379b91 100755
--- a/flightquery.sh
+++ b/flightquery.sh
@@ -117,15 +117,15 @@ then
# TODO add real source
echo "https://www.blatech.co.uk/ars/flight-query"
exit 0
-elif [[ ${input} =~ "-a" ]] || [[ ${input} == "--arrivals" ]]
+elif [[ ${input} =~ "-a" ]] || [[ ${input} =~ "--arrivals" ]]
then
queryType="arr_iata"
_arrivals
-elif [[ ${input} =~ "-d" ]] || [[ ${input} == "--departures" ]]
+elif [[ ${input} =~ "-d" ]] || [[ ${input} =~ "--departures" ]]
then
queryType="dep_iata"
_departures
- # if it doesn't match an option then it's probably a specific plane
+# if it doesn't match an option then it's probably a specific plane
else
queryType="flight_iata"
_flight