instanceinfo.sh: Print links to Mastodon-admin profiles.

This commit is contained in:
tastytea 2019-06-23 22:42:09 +02:00
parent 953b0c574f
commit 58e22e8133
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
# Print some basic info about fediverse instances. Install json_pp for prettier
# output.
# Version: 2019-06-23_1
# Version: 2019-06-23_2
if [ -z "${1}" ]; then
echo "usage: ${0} DOMAIN" >&2
@ -75,8 +75,8 @@ function main()
striphtml $(grep -Eo '"description":"[^,]+",' <<<"${json}") | cut -d: -f2,3,4,5,6,7,8,9
# shellcheck disable=SC2155
local admin=$(grep -Eo '"acct":"[^"]+"' <<<"${json}" | cut -d: -f2 | sed 's/"//g')"@${instance}"
[[ -n "${admin}" ]] && echo "Admin: @${admin}"
local admin=$(grep -Eo '"acct":"[^"]+"' <<<"${json}" | cut -d: -f2 | sed 's/"//g')
[[ -n "${admin}" ]] && echo "Admin: https://${instance}/users/${admin}"
# shellcheck disable=SC2155
local email=$(grep -Eo '"email":"[^"]+"' <<<"${json}" | cut -d: -f2)