diff options
-rwxr-xr-x | tools/init/sync.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/init/sync.sh b/tools/init/sync.sh index 339e21a..c2d40bd 100755 --- a/tools/init/sync.sh +++ b/tools/init/sync.sh | |||
@@ -5,8 +5,10 @@ pidof git >/dev/null && exit 0 | |||
5 | 5 | ||
6 | # my repo | 6 | # my repo |
7 | sync() { | 7 | sync() { |
8 | { cd $1 && [[ -n $(git remote -v) ]] || return; } 2>/dev/null | 8 | { |
9 | git pull --quiet || echo Has trouble when syncing `pwd` >/dev/tty | 9 | cd $1 && [[ -n `git remote -v` ]] || return |
10 | } 2>/dev/null | ||
11 | GIT_SSH_COMMAND="ssh -o ControlMaster=no" git pull --quiet || echo Has trouble when syncing `pwd` >/dev/tty | ||
10 | } | 12 | } |
11 | sync $SETTING_DIR & | 13 | sync $SETTING_DIR & |
12 | sync ~/blog & | 14 | sync ~/blog & |