1 Star 0 Fork 0

00fly / git-cron

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
run.sh 369 Bytes
一键复制 编辑 原始数据 按行查看 历史
00fly 提交于 2024-03-05 09:09 . update
#!/bin/sh
# defines variable
git="git-cron" && path=`pwd` && gitpath=$path/$git
# git pull
cd $gitpath && git pull \
&& now=`git log -1 --format="%at"` \
&& last=`cat $path/last`
# check timestamp, if changed print git log
if [ ! $last ] || [ $now -gt $last ] ; then
echo "git changed!!" && echo $now>$path/last && echo `git log -1`
else
echo "git not change"
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/00fly/git-cron.git
git@gitee.com:00fly/git-cron.git
00fly
git-cron
git-cron
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891