diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2023-05-16 07:31:57 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2023-05-16 07:31:57 +0800 |
commit | 268312097f5cc64ce02c183bcc303f08016d7d20 (patch) | |
tree | 5c0c6711a2e63a1ac1876db0e99590e495d50682 /bin/init/sync.sh | |
parent | 185caf49606a97c71379d7818b9d2d148127af18 (diff) |
Update
Diffstat (limited to 'bin/init/sync.sh')
-rwxr-xr-x | bin/init/sync.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/init/sync.sh b/bin/init/sync.sh index 5a7c435..351bb74 100755 --- a/bin/init/sync.sh +++ b/bin/init/sync.sh | |||
@@ -9,7 +9,8 @@ sync() { | |||
9 | [ -z "$(git remote -v)" ] && return | 9 | [ -z "$(git remote -v)" ] && return |
10 | 10 | ||
11 | pwd | 11 | pwd |
12 | GIT_SSH_COMMAND="ssh -o ControlMaster=no" git pull --quiet || echo Has trouble when syncing `pwd` | 12 | GIT_SSH_COMMAND="ssh -o ControlMaster=no" git pull --quiet || \ |
13 | echo "Has trouble when syncing $(pwd)" | ||
13 | } | 14 | } |
14 | 15 | ||
15 | sed /^#/d ~/.repos | while read -r repo; do | 16 | sed /^#/d ~/.repos | while read -r repo; do |
@@ -17,7 +18,7 @@ sed /^#/d ~/.repos | while read -r repo; do | |||
17 | done | 18 | done |
18 | 19 | ||
19 | while true; do | 20 | while true; do |
20 | if test $(jobs -r | wc -l) -gt 0; then | 21 | if test "$(jobs -r | wc -l)" -gt 0; then |
21 | sleep 1; | 22 | sleep 1; |
22 | else | 23 | else |
23 | which notify-send &>/dev/null && notify-send 'Repos synced' | 24 | which notify-send &>/dev/null && notify-send 'Repos synced' |