diff options
author | Hsieh Chin Fan <typebrook@gmail.com> | 2022-04-17 11:20:02 +0800 |
---|---|---|
committer | Hsieh Chin Fan <typebrook@gmail.com> | 2022-04-17 11:20:02 +0800 |
commit | 0ba215bd0f5f7dd160783e3782d40cbfc249a0fd (patch) | |
tree | 4ec7a4366d662dc8b52fa0df2cc52e01ada399b7 /tools/init/sync.sh | |
parent | 7554b23b59bfe3b57ba46726b17063c17b052567 (diff) | |
parent | 38a86b051449b1004e8e098c8c831ae974e5102b (diff) |
Merge remote-tracking branch 'origin/dev' into dev
Diffstat (limited to 'tools/init/sync.sh')
-rwxr-xr-x | tools/init/sync.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/init/sync.sh b/tools/init/sync.sh index 04af87e..ebed33a 100755 --- a/tools/init/sync.sh +++ b/tools/init/sync.sh | |||
@@ -1,5 +1,8 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | # If git is working in other process, then don't sync again | ||
4 | ! pidof git && exit 0 | ||
5 | |||
3 | # my repo | 6 | # my repo |
4 | sync() { | 7 | sync() { |
5 | { cd $1 && [[ -n $(git remote -v) ]] || return ; } 2>/dev/null | 8 | { cd $1 && [[ -n $(git remote -v) ]] || return ; } 2>/dev/null |