From daafd7355f94e059c63c8cfa236845abf94f3855 Mon Sep 17 00:00:00 2001 From: typebrook Date: Sat, 9 Nov 2019 17:40:29 +0800 Subject: update --- Makefile | 11 ++++++----- scripts/check_upstream.sh | 2 +- scripts/my-settings.sh | 5 ++++- scripts/sync.sh | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 133f60f..f9ef05e 100644 --- a/Makefile +++ b/Makefile @@ -15,11 +15,6 @@ vim: rm -f ~/.vim_runtime/my_configs.vim ln -s `pwd`/vimrc ~/.vim_runtime/my_configs.vim -wiki: - # vimwiki - if [ ! -d "$(HOME)/.vimwiki" ]; then \ - git clone --depth=1 git@github.com:typebrook/wiki.git ~/vimwiki; \ - fi git: rm -f ~/.gitconfig @@ -29,6 +24,12 @@ tig: rm -f ~/.tigrc ln -s `pwd`/tigrc ~/.tigrc +wiki: + # vimwiki + if [ ! -d "$(HOME)/.vimwiki" ]; then \ + git clone --depth=1 git@github.com:typebrook/wiki.git ~/vimwiki; \ + fi + crontab: (crontab -l 2>/dev/null; cat scripts/*.cron) | crontab - diff --git a/scripts/check_upstream.sh b/scripts/check_upstream.sh index 84adb9e..c08b3cf 100755 --- a/scripts/check_upstream.sh +++ b/scripts/check_upstream.sh @@ -23,5 +23,5 @@ check_upstream() { echo "New commit at" $1 fi - echo $(date) check $1 >> ~/git/settings/log + echo $(date) check $1 >> $SETTING_DIR/log } diff --git a/scripts/my-settings.sh b/scripts/my-settings.sh index 92a22ce..e21aecd 100755 --- a/scripts/my-settings.sh +++ b/scripts/my-settings.sh @@ -1,5 +1,8 @@ if [[ -z "$SETTING_DIR" ]]; then - SETTING_DIR="$HOME/settings" + SETTING_DIR=$HOME/settings fi source $SETTING_DIR/alias.sh + +PATH=$PATH:$SETTING_DIR/scripts +$SETTING_DIR/scripts/sync.sh diff --git a/scripts/sync.sh b/scripts/sync.sh index 665acba..fa37fee 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -3,7 +3,7 @@ DIR="$(cd "$(dirname "$0")" && pwd)" source $DIR/check_upstream.sh -cd ~/git/settings && git pull --quiet & +cd $SETTING_DIR && git pull --quiet & cd ~/vimwiki && git pull --quiet & check_upstream ~/git/tig & check_upstream ~/.vim_runtime & -- cgit v1.2.3-70-g09d2