diff options
author | Hsieh Chin Fan <typebrook@gmail.com> | 2022-04-15 22:05:06 +0800 |
---|---|---|
committer | Hsieh Chin Fan <typebrook@gmail.com> | 2022-04-15 22:05:06 +0800 |
commit | 38a86b051449b1004e8e098c8c831ae974e5102b (patch) | |
tree | 00afdf3b7dedfa5d033b486cc532add8fa3cd64b /tools | |
parent | e3757d41bfa94dd79266a002def83601204010ae (diff) |
Update
Diffstat (limited to 'tools')
-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 |