diff options
| author | typebrook <typebrook@gmail.com> | 2019-11-09 17:40:29 +0800 |
|---|---|---|
| committer | typebrook <typebrook@gmail.com> | 2019-11-09 17:40:29 +0800 |
| commit | daafd7355f94e059c63c8cfa236845abf94f3855 (patch) | |
| tree | 99bae28043881e9dd53de7168261d1b41999e412 | |
| parent | 74b56112c08a010b890b894ac2abef58c8f0f77a (diff) | |
update
| -rw-r--r-- | Makefile | 11 | ||||
| -rwxr-xr-x | scripts/check_upstream.sh | 2 | ||||
| -rwxr-xr-x | scripts/my-settings.sh | 5 | ||||
| -rwxr-xr-x | scripts/sync.sh | 2 |
4 files changed, 12 insertions, 8 deletions
| @@ -15,11 +15,6 @@ vim: | |||
| 15 | rm -f ~/.vim_runtime/my_configs.vim | 15 | rm -f ~/.vim_runtime/my_configs.vim |
| 16 | ln -s `pwd`/vimrc ~/.vim_runtime/my_configs.vim | 16 | ln -s `pwd`/vimrc ~/.vim_runtime/my_configs.vim |
| 17 | 17 | ||
| 18 | wiki: | ||
| 19 | # vimwiki | ||
| 20 | if [ ! -d "$(HOME)/.vimwiki" ]; then \ | ||
| 21 | git clone --depth=1 git@github.com:typebrook/wiki.git ~/vimwiki; \ | ||
| 22 | fi | ||
| 23 | 18 | ||
| 24 | git: | 19 | git: |
| 25 | rm -f ~/.gitconfig | 20 | rm -f ~/.gitconfig |
| @@ -29,6 +24,12 @@ tig: | |||
| 29 | rm -f ~/.tigrc | 24 | rm -f ~/.tigrc |
| 30 | ln -s `pwd`/tigrc ~/.tigrc | 25 | ln -s `pwd`/tigrc ~/.tigrc |
| 31 | 26 | ||
| 27 | wiki: | ||
| 28 | # vimwiki | ||
| 29 | if [ ! -d "$(HOME)/.vimwiki" ]; then \ | ||
| 30 | git clone --depth=1 git@github.com:typebrook/wiki.git ~/vimwiki; \ | ||
| 31 | fi | ||
| 32 | |||
| 32 | crontab: | 33 | crontab: |
| 33 | (crontab -l 2>/dev/null; cat scripts/*.cron) | crontab - | 34 | (crontab -l 2>/dev/null; cat scripts/*.cron) | crontab - |
| 34 | 35 | ||
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() { | |||
| 23 | echo "New commit at" $1 | 23 | echo "New commit at" $1 |
| 24 | fi | 24 | fi |
| 25 | 25 | ||
| 26 | echo $(date) check $1 >> ~/git/settings/log | 26 | echo $(date) check $1 >> $SETTING_DIR/log |
| 27 | } | 27 | } |
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 @@ | |||
| 1 | if [[ -z "$SETTING_DIR" ]]; then | 1 | if [[ -z "$SETTING_DIR" ]]; then |
| 2 | SETTING_DIR="$HOME/settings" | 2 | SETTING_DIR=$HOME/settings |
| 3 | fi | 3 | fi |
| 4 | 4 | ||
| 5 | source $SETTING_DIR/alias.sh | 5 | source $SETTING_DIR/alias.sh |
| 6 | |||
| 7 | PATH=$PATH:$SETTING_DIR/scripts | ||
| 8 | $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 @@ | |||
| 3 | DIR="$(cd "$(dirname "$0")" && pwd)" | 3 | DIR="$(cd "$(dirname "$0")" && pwd)" |
| 4 | source $DIR/check_upstream.sh | 4 | source $DIR/check_upstream.sh |
| 5 | 5 | ||
| 6 | cd ~/git/settings && git pull --quiet & | 6 | cd $SETTING_DIR && git pull --quiet & |
| 7 | cd ~/vimwiki && git pull --quiet & | 7 | cd ~/vimwiki && git pull --quiet & |
| 8 | check_upstream ~/git/tig & | 8 | check_upstream ~/git/tig & |
| 9 | check_upstream ~/.vim_runtime & | 9 | check_upstream ~/.vim_runtime & |