Deadswitch: Use git patches instead of a raw markdown file

This commit is contained in:
CPunch 2022-08-01 23:57:43 -05:00
parent 95bf7557ef
commit 63715f1f8a
2 changed files with 5 additions and 5 deletions

View File

@ -16,10 +16,10 @@
dest: /root/deadman/imdead.sh
mode: u+rwx
- name: Copy dead message
- name: Copy dead patch
template:
src: secrets/dead.md
dest: /root/deadman/dead.md
src: secrets/dead.patch
dest: /root/deadman/dead.patch
- name: Install deadtrigger
file:

View File

@ -2,12 +2,12 @@
cd $HOME/deadman
postTemplate='dead.md'
postPatch='dead.patch'
pageName='openpunk/content/pages/dead.md'
currDate=$(date '+%Y-%m-%d')
git clone git@github.com:CPunch/openpunk.git
cp $postTemplate $pageName
git am postPatch
# replace our --DATE-- with the current date
sed -i 's/--DATE--/'$currDate'/g' $pageName