forked from kageru/mdb
add human readable output for cron notifications
This commit is contained in:
parent
c85f2dc68f
commit
d931e81f09
@ -36,12 +36,14 @@ has_updates() {
|
|||||||
|
|
||||||
cd /home/nginx/html/blog
|
cd /home/nginx/html/blog
|
||||||
if has_updates; then
|
if has_updates; then
|
||||||
git pull
|
git pull &> /dev/null
|
||||||
rm index.html
|
rm -f index.html
|
||||||
output '<h1>Blog index</h1>'
|
output '<h1>Blog index</h1>'
|
||||||
output '<table id="linklist">'
|
output '<table id="linklist">'
|
||||||
ls -ltu src/*.md | tail -n+1 | while read f; do create_entry $f; done
|
ls -ltu src/*.md | tail -n+1 | while read f; do create_entry $f; done
|
||||||
html_entry "legacy" "before 2020" "Older posts"
|
html_entry "legacy" "before 2020" "Older posts"
|
||||||
output '</table>'
|
output '</table>'
|
||||||
output "<footer><a href=\"https://kageru.moe/contact/\">Contact</a><br/>generated on $(date '+%d.%m.%y at %H:%M:%S')</footer>"
|
output "<footer><a href=\"https://kageru.moe/contact/\">Contact</a><br/>generated on $(date '+%d.%m.%y at %H:%M:%S')</footer>"
|
||||||
|
# Human-readable output for the cron notification
|
||||||
|
echo "Updated blog to $(git shortlog | tail -n2 | head -n1)"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user