summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsa Venton <asav1410@gmail.com>2019-10-21 12:11:44 +0100
committerAsa Venton <asav1410@gmail.com>2019-10-21 12:11:44 +0100
commit6624128599ae0e021cb5097b56caae9215ed9c4c (patch)
treedbe78b711baa86cd153eb51c60db29a0d29ed058
parentaacf6b7a5c89c74a4088d62b69e55911a1e84eaf (diff)
Set curls to silent in json update script
-rw-r--r--getjson.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/getjson.sh b/getjson.sh
index 3ff6080..bce999f 100644
--- a/getjson.sh
+++ b/getjson.sh
@@ -1,9 +1,9 @@
#!/bin/bash
if [ ! -f ./timetable_full.json ]; then
- curl https://admin.libertybus.je/cache/timetables/timetable_full.json > ./timetable_full.json
+ curl --silent https://admin.libertybus.je/cache/timetables/timetable_full.json > ./timetable_full.json
md5sum ./timetable_full.json | cut -f1 -d ' ' > timetable_full.json.md5hash.txt
else
- curl https://admin.libertybus.je/cache/timetables/timetable_full.json > ./timetable_full.new.json
+ curl --silent https://admin.libertybus.je/cache/timetables/timetable_full.json > ./timetable_full.new.json
newHash=`md5sum timetable_full.new.json | cut -f1 -d ' '`
if [ $newHash != ./timetable_full.json.md5hash.txt ]; then
rm ./timetable_full.json && rm ./timetable_full.json.md5hash.txt
@@ -12,10 +12,10 @@ else
fi
fi
if [ ! -f ./service_updates.json ]; then
- curl https://admin.libertybus.je/api/v1/service_updates > ./service_updates.json
+ curl --silent https://admin.libertybus.je/api/v1/service_updates > ./service_updates.json
md5sum ./service_updates.json | cut -f1 -d ' ' > service_updates.json.md5hash.txt
else
- curl https://admin.libertybus.je/api/v1/service_updates > ./service_updates.new.json
+ curl --silent https://admin.libertybus.je/api/v1/service_updates > ./service_updates.new.json
newHash=`md5sum service_updates.new.json | cut -f1 -d ' '`
if [ $newHash != ./service_updates.json.md5hash.txt ]; then
rm ./service_updates.json && rm ./service_updates.json.md5hash.txt