diff options
author | Hsieh Chin Fan <typebrook@gmail.com> | 2022-08-11 10:46:16 +0800 |
---|---|---|
committer | Hsieh Chin Fan <typebrook@gmail.com> | 2022-08-11 11:02:18 +0800 |
commit | 0a75fc5fef9c1011daa63028491d79223486860c (patch) | |
tree | 241ea3455942ae1a676f224f4a5453bfbb07e858 /tools | |
parent | b4071a61876ef0f779705fe2de1aaf9b4017e0de (diff) |
Fix SSH multiplexing issue
Diffstat (limited to 'tools')
-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 & |