ai/at
ai/at
1
0

fix script

This commit is contained in:
syui 2025-02-24 12:41:58 +09:00
parent 94d11e805a
commit 815dcd3b80
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
3 changed files with 16 additions and 13 deletions

View File

@ -8,7 +8,7 @@ source $d/src/func.zsh
at-env
case $1 in
version|v)
at-version
at-pds-version
;;
uri|u)
at-uri $2

View File

@ -27,25 +27,28 @@ function at-unset() {
unset t password token refresh
}
function at-version-json() {
latest=`curl -sL https://raw.githubusercontent.com/bluesky-social/atproto/refs/heads/main/packages/pds/package.json |jq -r .version`
echo "["
echo "{\"latest\":\"$latest\"},"
e=${pds_list[@]: -1}
echo "["
for i in $pds_list; do
function at-pds-version-env() {
title="atproto pds version"
latest=https://raw.githubusercontent.com/bluesky-social/atproto/refs/heads/main/packages/pds/package.json
pds=(bsky.social syu.is boobee.blue socl.is )
}
function at-pds-version-json() {
latest=`curl -sL $latest |jq -r .version`
echo "[{\"title\":\"$title\",\"latest\":\"$latest\"},["
e=${pds[@]: -1}
for i in $pds; do
t=`curl -sL ${i}/xrpc/_health |jq -r .version`
echo "{\"$i\":\"$t\"}"
if [ "$e" != "$i" ];then
echo ,
fi
done
echo "]"
echo "]"
echo "]]"
}
function at-version() {
at-version-json |jq .
function at-pds-version() {
at-pds-version-env
at-pds-version-json |jq .
}
function at-uri() {

View File

@ -37,4 +37,4 @@ github=(
https://github.com/did-method-plc/did-method-plc
)
tag=( at bsky bsync pds bgs plc ozone feed jetstream social-app oauth )
pds_list=(bsky.social syu.is boobee.blue socl.is )
#pds_list=(bsky.social syu.is boobee.blue socl.is )