aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rwxr-xr-xscripts/check_upstream.sh2
-rwxr-xr-xscripts/my-settings.sh5
-rwxr-xr-xscripts/sync.sh2
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:
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
18wiki:
19 # vimwiki
20 if [ ! -d "$(HOME)/.vimwiki" ]; then \
21 git clone --depth=1 git@github.com:typebrook/wiki.git ~/vimwiki; \
22 fi
23 18
24git: 19git:
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
27wiki:
28 # vimwiki
29 if [ ! -d "$(HOME)/.vimwiki" ]; then \
30 git clone --depth=1 git@github.com:typebrook/wiki.git ~/vimwiki; \
31 fi
32
32crontab: 33crontab:
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 @@
1if [[ -z "$SETTING_DIR" ]]; then 1if [[ -z "$SETTING_DIR" ]]; then
2 SETTING_DIR="$HOME/settings" 2 SETTING_DIR=$HOME/settings
3fi 3fi
4 4
5source $SETTING_DIR/alias.sh 5source $SETTING_DIR/alias.sh
6
7PATH=$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 @@
3DIR="$(cd "$(dirname "$0")" && pwd)" 3DIR="$(cd "$(dirname "$0")" && pwd)"
4source $DIR/check_upstream.sh 4source $DIR/check_upstream.sh
5 5
6cd ~/git/settings && git pull --quiet & 6cd $SETTING_DIR && git pull --quiet &
7cd ~/vimwiki && git pull --quiet & 7cd ~/vimwiki && git pull --quiet &
8check_upstream ~/git/tig & 8check_upstream ~/git/tig &
9check_upstream ~/.vim_runtime & 9check_upstream ~/.vim_runtime &