From 0a3852bd3b2e1adf198946d7b4ce34fd59b8546b Mon Sep 17 00:00:00 2001 From: syui Date: Thu, 8 Feb 2024 15:32:27 +0900 Subject: [PATCH] fix scpt --- scpt/main.zsh => ai.zsh | 2 +- scpt/refresh.zsh | 2 +- scpt/reply.zsh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename scpt/main.zsh => ai.zsh (94%) 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` }