summaryrefslogtreecommitdiff
path: root/getjson.sh
diff options
context:
space:
mode:
Diffstat (limited to 'getjson.sh')
-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