openpunk-ansible/templates/blog/imdead.sh

20 lines
423 B
Bash
Raw Normal View History

#!/bin/bash
cd $HOME/deadman
postPatch='dead.patch'
pageName='openpunk/content/pages/dead.md'
currDate=$(date '+%Y-%m-%d')
git clone git@github.com:CPunch/openpunk.git
git am postPatch
2022-05-31 04:36:55 +00:00
# replace our --DATE-- with the current date
sed -i 's/--DATE--/'$currDate'/g' $pageName
# commit & push the post
cd openpunk
git add .
2022-05-31 04:36:55 +00:00
git commit -m "DeadSwitch: No response from CPunch in 14 days, posting dead.md"
git push --force