summaryrefslogtreecommitdiff
path: root/livetimes.sh
diff options
context:
space:
mode:
Diffstat (limited to 'livetimes.sh')
-rwxr-xr-xlivetimes.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/livetimes.sh b/livetimes.sh
index 6dfcfb5..9c9d7bd 100755
--- a/livetimes.sh
+++ b/livetimes.sh
@@ -8,9 +8,9 @@ _jq() {
echo ${json} | base64 --decode | jq -r ${1}
}
+# TODO: efficiency of _liveresult?
_liveresult() {
livetimes=$(curl --silent https://admin.libertybus.je/api/v1/soj/stop_updates/${stop})
- # doesn't work without encoding in base64 (why?)
result="$result Dest: "
for json in $(echo "${livetimes}" | jq -r '.[] | @base64'); do
result="$result $(_jq '.destination'), "
@@ -24,7 +24,7 @@ _liveresult() {
result="$result | ETAs: "
for json in $(echo "${livetimes}" | jq -r '.[] | @base64'); do
result="$result $(_jq '.eta'), "
- result=$(echo $result | sed 's/, $//')
+ result=$(echo $result | sed 's/,$//')
done
echo -e $result
exit 0