1
0
Fork 0
mirror of https://github.com/benbusby/farside.git synced 2025-04-25 13:10:02 +00:00

Add auto update instances for libreddit (#80)

* Change libreddit's fallback URL to official instance's URL

* Add auto update instances for libreddit
This commit is contained in:
sian1468 2022-12-12 03:45:13 +07:00 committed by GitHub
parent 2a858b89d2
commit f676d12988
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View file

@ -189,6 +189,21 @@ jobs:
#apply_update
# ==============================================================
# libreddit update
# ==============================================================
curl -s https://raw.githubusercontent.com/libreddit/libreddit-instances/master/instances.json | \
jq '[
.instances[] |
select(.url) |
.url ] |
sort' > libreddit-tmp.json
jq --slurpfile libreddit libreddit-tmp.json \
'( .[] | select(.type == "libreddit") )
.instances |= $libreddit[0]' services-full.json > services-tmp.json
apply_update
# ==============================================================
# TODO: Update instances for other services
# ==============================================================