instanceinfo.sh: Improved Mastodon fork detection.
This commit is contained in:
parent
2ba49d8fb9
commit
5865c6ecb4
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Print some basic info about fediverse instances.
|
# Print some basic info about fediverse instances.
|
||||||
|
|
||||||
# Version: 2019-07-15_1
|
# Version: 2019-07-15_2
|
||||||
|
|
||||||
if [[ -z "${1}" ]]; then
|
if [[ -z "${1}" ]]; then
|
||||||
echo "usage: ${0} DOMAIN" >&2
|
echo "usage: ${0} DOMAIN" >&2
|
||||||
|
@ -107,7 +107,7 @@ function main()
|
||||||
implementation="Florence"
|
implementation="Florence"
|
||||||
elif grep -Eq '"version":"[0-9]+\.[0-9]+\.[0-9]+"' <<<"${json}"; then
|
elif grep -Eq '"version":"[0-9]+\.[0-9]+\.[0-9]+"' <<<"${json}"; then
|
||||||
implementation="Mastodon"
|
implementation="Mastodon"
|
||||||
elif grep -Eq '"version":"[0-9]+\.[0-9]+\.[0-9a-zA-Z]+"' <<<"${json}"; then
|
elif grep -Eq '"version":"[0-9]+\.[0-9]+\.[0-9][\._\-]?[a-zA-Z]+"' <<<"${json}"; then
|
||||||
implementation="Mastodon fork"
|
implementation="Mastodon fork"
|
||||||
fi
|
fi
|
||||||
if [[ -n "${implementation}" ]]; then
|
if [[ -n "${implementation}" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue