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 at-env
case $1 in case $1 in
version|v) version|v)
at-version at-pds-version
;; ;;
uri|u) uri|u)
at-uri $2 at-uri $2

View File

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

View File

@ -37,4 +37,4 @@ github=(
https://github.com/did-method-plc/did-method-plc https://github.com/did-method-plc/did-method-plc
) )
tag=( at bsky bsync pds bgs plc ozone feed jetstream social-app oauth ) 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 )