Added wiki-sync script
This commit is contained in:
parent
3637ce1f94
commit
7e3ed8cff6
@ -3,5 +3,8 @@
|
|||||||
TARGET_DIR=~/.local/bin
|
TARGET_DIR=~/.local/bin
|
||||||
|
|
||||||
mkdir --parents ~/.local/bin
|
mkdir --parents ~/.local/bin
|
||||||
|
|
||||||
ln -svrf light ${TARGET_DIR}/light
|
ln -svrf light ${TARGET_DIR}/light
|
||||||
ln -svrf dark ${TARGET_DIR}/dark
|
ln -svrf dark ${TARGET_DIR}/dark
|
||||||
|
|
||||||
|
ln -svrf wiki-sync ${TARGET_DIR}/wiki-sync
|
||||||
|
11
bin/wiki-sync
Executable file
11
bin/wiki-sync
Executable file
@ -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
|
Reference in New Issue
Block a user