diff --git a/scpt/main.zsh b/ai.zsh similarity index 94% rename from scpt/main.zsh rename to ai.zsh index 47871be..21c3171 100755 --- a/scpt/main.zsh +++ b/ai.zsh @@ -4,7 +4,7 @@ case $OSTYPE in alias date="/opt/homebrew/bin/gdate" ;; esac -d=${0:a:h} +d=${0:a:h}/scpt source $d/env source $d/refresh.zsh source $d/token.zsh diff --git a/scpt/refresh.zsh b/scpt/refresh.zsh index fcde146..81998ce 100755 --- a/scpt/refresh.zsh +++ b/scpt/refresh.zsh @@ -5,7 +5,7 @@ function refresh(){ token fi url=https://$host/xrpc/com.atproto.server.refreshSession - j=`curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $refresh" $url` + j=`curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $refresh" $url` echo $j echo $j >! $cfg.t } diff --git a/scpt/reply.zsh b/scpt/reply.zsh index db4c42a..af7d7b0 100755 --- a/scpt/reply.zsh +++ b/scpt/reply.zsh @@ -25,5 +25,5 @@ json="{ echo $json|jq . url=https://$host/xrpc/com.atproto.repo.createRecord -j=`curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d "$json" $url` +j=`curl -sL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d "$json" $url` }