From 83b9c981359f0eb753eca9dcd68613b62b3b3947 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 21 Jul 2019 05:02:34 +0200 Subject: [PATCH] instanceinfo.sh: Improved Mastodon-fork detection. --- instanceinfo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instanceinfo.sh b/instanceinfo.sh index 7eaff37..f956f32 100755 --- a/instanceinfo.sh +++ b/instanceinfo.sh @@ -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