mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2024-11-22 07:20:05 +00:00
Deadswitch: Use git patches instead of a raw markdown file
This commit is contained in:
parent
95bf7557ef
commit
63715f1f8a
@ -16,10 +16,10 @@
|
|||||||
dest: /root/deadman/imdead.sh
|
dest: /root/deadman/imdead.sh
|
||||||
mode: u+rwx
|
mode: u+rwx
|
||||||
|
|
||||||
- name: Copy dead message
|
- name: Copy dead patch
|
||||||
template:
|
template:
|
||||||
src: secrets/dead.md
|
src: secrets/dead.patch
|
||||||
dest: /root/deadman/dead.md
|
dest: /root/deadman/dead.patch
|
||||||
|
|
||||||
- name: Install deadtrigger
|
- name: Install deadtrigger
|
||||||
file:
|
file:
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
cd $HOME/deadman
|
cd $HOME/deadman
|
||||||
|
|
||||||
postTemplate='dead.md'
|
postPatch='dead.patch'
|
||||||
pageName='openpunk/content/pages/dead.md'
|
pageName='openpunk/content/pages/dead.md'
|
||||||
currDate=$(date '+%Y-%m-%d')
|
currDate=$(date '+%Y-%m-%d')
|
||||||
|
|
||||||
git clone git@github.com:CPunch/openpunk.git
|
git clone git@github.com:CPunch/openpunk.git
|
||||||
cp $postTemplate $pageName
|
git am postPatch
|
||||||
|
|
||||||
# replace our --DATE-- with the current date
|
# replace our --DATE-- with the current date
|
||||||
sed -i 's/--DATE--/'$currDate'/g' $pageName
|
sed -i 's/--DATE--/'$currDate'/g' $pageName
|
||||||
|
Loading…
Reference in New Issue
Block a user