Skip to content

Commit

Permalink
fix #16
Browse files Browse the repository at this point in the history
  • Loading branch information
kaihendry committed Sep 20, 2024
1 parent 99fd548 commit 7d6b359
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions allthebusstops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ while :; do
done

jq . ./*.json | jq -s . >"$pwd/all.json"
busstopcount=$(jq 'length' "$pwd/all.json")
echo "Bus stop count: $busstopcount"
newBusCount=$(jq 'length' "$pwd/all.json")
echo "Bus stop count: $newBusCount"

mv $pwd/all.json $pwd/static/

sed -i "s,{{ totalStops }},$busstopcount," "$pwd/static/index.html"
sed -i -E "s/(are )\S+ bus/\1bus $newBusCount/" $pwd/static/index.html
2 changes: 1 addition & 1 deletion static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h4>Last updated: <span id=lastupdated></span></h4>
<li><a href=https://github.com/kaihendry/ltabus>Source code</a></li>
<li><a href="mailto:[email protected]">Please email feedback</a></li>
<li><a href=https://railrouter.sg />Train map</a></li>
<li>There are 5043 bus stops in Singapore</li>
<li>There are bus 5136 stops in Singapore</li>
</ul>
</footer>

Expand Down

0 comments on commit 7d6b359

Please sign in to comment.