fix scpt
This commit is contained in:
parent
a93f08dcc6
commit
05493b2acb
@ -8,7 +8,7 @@ source $d/src/func.zsh
|
|||||||
at-env
|
at-env
|
||||||
case $1 in
|
case $1 in
|
||||||
version|v)
|
version|v)
|
||||||
at-pds-version
|
at-version $2
|
||||||
;;
|
;;
|
||||||
uri|u)
|
uri|u)
|
||||||
at-uri $2
|
at-uri $2
|
||||||
|
@ -27,17 +27,33 @@ function at-unset() {
|
|||||||
unset t password token refresh
|
unset t password token refresh
|
||||||
}
|
}
|
||||||
|
|
||||||
function at-pds-version-env() {
|
function at-version-env() {
|
||||||
title="atproto pds version"
|
case $1 in
|
||||||
latest=https://raw.githubusercontent.com/bluesky-social/atproto/refs/heads/main/packages/pds/package.json
|
bsky)
|
||||||
pds=( bsky.social syu.is boobee.blue socl.is )
|
tag=$1
|
||||||
|
list=( public.api.bsky.app bsky.syu.is )
|
||||||
|
;;
|
||||||
|
ozone)
|
||||||
|
tag=$1
|
||||||
|
list=( ozone.bsky.social ozone.syu.is )
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
tag=pds
|
||||||
|
list=( bsky.social syu.is boobee.blue socl.is )
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
title="atproto $tag version"
|
||||||
|
latest=https://raw.githubusercontent.com/bluesky-social/atproto/refs/heads/main/packages/$tag/package.json
|
||||||
|
|
||||||
|
# bgs=( bsky.network bgs.syu.is )
|
||||||
|
# plc=( plc.directory plc.syu.is )
|
||||||
}
|
}
|
||||||
|
|
||||||
function at-pds-version-json() {
|
function at-version-json() {
|
||||||
latest=`curl -sL $latest |jq -r .version`
|
latest=`curl -sL $latest |jq -r .version`
|
||||||
echo "[{\"title\":\"$title\",\"latest\":\"$latest\"},["
|
echo "[{\"title\":\"$title\",\"latest\":\"$latest\"},["
|
||||||
e=${pds[@]: -1}
|
e=${list[@]: -1}
|
||||||
for i in $pds; do
|
for i in $list; 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
|
||||||
@ -47,9 +63,9 @@ function at-pds-version-json() {
|
|||||||
echo "]]"
|
echo "]]"
|
||||||
}
|
}
|
||||||
|
|
||||||
function at-pds-version() {
|
function at-version() {
|
||||||
at-pds-version-env
|
at-version-env $1
|
||||||
at-pds-version-json |jq .
|
at-version-json |jq .
|
||||||
}
|
}
|
||||||
|
|
||||||
function at-uri() {
|
function at-uri() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user