instanceinfo.sh: Improved Mastodon-fork detection.

This commit is contained in:
tastytea 2019-07-21 05:02:34 +02:00
parent be26298117
commit 83b9c98135
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Print some basic info about fediverse instances.
# Version: 2019-07-18_1
# Version: 2019-07-21_1
if [[ -z "${1}" ]]; then
echo "usage: ${0} DOMAIN" >&2
@ -98,7 +98,7 @@ function parse_mastodon()
implementation="Florence"
elif grep -Eq '"version":"[0-9]+\.[0-9]+\.[0-9]+"' <<<"${json}"; then
implementation="Mastodon"
elif grep -Eq '"version":"[0-9]+\.[0-9]+\.[0-9][\._\-]?[a-zA-Z]+"' <<<"${json}"; then
elif grep -Eq '"version":"[0-9]+\.[0-9]+\.[0-9][\._\-\+]?[a-zA-Z0-9]+"' <<<"${json}"; then
implementation="Mastodon fork"
fi
if [[ -n "${implementation}" ]]; then