diff --git a/blog-refresh.sh b/blog-refresh.sh index 4c4c130..90689cb 100644 --- a/blog-refresh.sh +++ b/blog-refresh.sh @@ -36,12 +36,14 @@ has_updates() { cd /home/nginx/html/blog if has_updates; then - git pull - rm index.html + git pull &> /dev/null + rm -f index.html output '

Blog index

' output '' ls -ltu src/*.md | tail -n+1 | while read f; do create_entry $f; done html_entry "legacy" "before 2020" "Older posts" output '' output "" + # Human-readable output for the cron notification + echo "Updated blog to $(git shortlog | tail -n2 | head -n1)" fi