1 Star 0 Fork 0

silencewing/remote_worker

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
init.sh 944 Bytes
一键复制 编辑 原始数据 按行查看 历史
silencewing 提交于 2021-06-19 01:23 . 1e3.025a4g.5d5u.new.esfix.savebest
#!/bin/bash
wait="#wait"
todo=$wait
last=""
while [ $todo != "#end" ]
do
{
echo '##################################'
echo '1.wait...'
sleep 1s
rm runner.sh
wget https://gitee.com/silencewing/remote_worker/raw/master/runner.sh
echo '##################################'
echo '2.fetch runner'
todo=$(head -n +1 runner.sh)
#if [ $todo == "#run" ]
run=${todo:0:4} #(expr match $todo "#run.*")
# echo 'run'
# echo $run
if [ $run == "#run" ];
then
# echo 'last=todo'
# echo $last
# echo $todo
if [[ $last == $todo ]];
then
echo '3.runner wait'
sleep 60s
continue
else
last=$todo
# echo 'last=todo 2'
# echo $last
# echo $todo
echo '##################################'
echo '3.runner todo'
message=${todo/'#run'/''}
sh ./runner.sh $todo
fi
fi
}||
{
echo '##################################'
echo 'err'
}
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/silencewing/remote_worker.git
git@gitee.com:silencewing/remote_worker.git
silencewing
remote_worker
remote_worker
master

搜索帮助