From bf2808eedcb44c1cf9cee17338e0619e6dfb8de6 Mon Sep 17 00:00:00 2001 From: syui Date: Sat, 24 Feb 2024 21:46:59 +0900 Subject: [PATCH] fix scpt --- test/ai.zsh | 4 ++++ test/notify_cid.zsh | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 test/notify_cid.zsh diff --git a/test/ai.zsh b/test/ai.zsh index d53abc1..ce07dc0 100755 --- a/test/ai.zsh +++ b/test/ai.zsh @@ -14,6 +14,7 @@ source $d/refresh.zsh source $d/token.zsh source $d/reply.zsh source $d/notify.zsh +source $d/notify_cid.zsh source $d/cron.zsh case $1 in @@ -32,4 +33,7 @@ case $1 in cron|c) cron ;; + cid) + cid + ;; esac diff --git a/test/notify_cid.zsh b/test/notify_cid.zsh new file mode 100644 index 0000000..412275f --- /dev/null +++ b/test/notify_cid.zsh @@ -0,0 +1,16 @@ + +function cid(){ + dd=${d:h} + ai=$dd/target/debug/ai + txt=$dd/.config/ai/txt + f=$txt/notify_cid + if [ ! -f $ai ];then + cd $dd + cargo build + fi + if [ ! -d $txt ];then + mkdir -p $txt + fi + $ai n|jq -r ".[]|.[]?.cid" >> $f.txt + cp -rf $f.txt ${f}_run.txt +}