2 Star 0 Fork 0

mirrors_OWASP/owasp-halifax

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
watch.sh 630 Bytes
一键复制 编辑 原始数据 按行查看 历史
angel() {
while inotifywait -r -qq -e modify -e move -e delete -e attrib --exclude '(.git/|_site/)' .; do
make update
done
}
daemon() {
chsum1=""
while [[ true ]]
do
chsum2=`find . -type f -exec md5sum {} \;`
if [[ $chsum1 != $chsum2 ]] ; then
make update
chsum1=$chsum2
fi
sleep 2
done
}
# Prefer to use inotify-tools if they're available.
# If not, just go with good ol' poll and sleep.
if [ -x "$(command -v inotifywait)" ]; then
angel
else
echo "Using less efficient poll/sleep watch. Consider installing inotify-tools."
daemon
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_OWASP/owasp-halifax.git
git@gitee.com:mirrors_OWASP/owasp-halifax.git
mirrors_OWASP
owasp-halifax
owasp-halifax
master

搜索帮助