From 7e3ed8cff6c81a665c898e8326c8da82a48c82e9 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Fri, 23 Oct 2020 12:06:15 +0200 Subject: [PATCH] Added wiki-sync script --- bin/install.sh | 3 +++ bin/wiki-sync | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100755 bin/wiki-sync diff --git a/bin/install.sh b/bin/install.sh index 098dac1..cbd9223 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -3,5 +3,8 @@ TARGET_DIR=~/.local/bin mkdir --parents ~/.local/bin + ln -svrf light ${TARGET_DIR}/light ln -svrf dark ${TARGET_DIR}/dark + +ln -svrf wiki-sync ${TARGET_DIR}/wiki-sync diff --git a/bin/wiki-sync b/bin/wiki-sync new file mode 100755 index 0000000..8049c2b --- /dev/null +++ b/bin/wiki-sync @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +for wiki in ~/vimwiki/* +do + echo Synching $wiki + git -C $wiki pull --rebase --autostash + git -C $wiki add . + git -C $wiki commit -a -n -m "Auto-update" + git -C $wiki push + echo done. +done