aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/init/sync.sh
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-02-14 13:33:23 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-02-14 13:33:23 +0800
commit6fae25b305d714b3ab7608fa003f1af9bf024545 (patch)
tree05507b2c0505659d2fd847ecce988dacab63a236 /tools/init/sync.sh
parent41ad31a2dee9ff912f222652f022b4c55cddcbf7 (diff)
Rename tools into bin
Diffstat (limited to 'tools/init/sync.sh')
-rwxr-xr-xtools/init/sync.sh37
1 files changed, 0 insertions, 37 deletions
diff --git a/tools/init/sync.sh b/tools/init/sync.sh
deleted file mode 100755
index bcd7bed..0000000
--- a/tools/init/sync.sh
+++ /dev/null
@@ -1,37 +0,0 @@
1#!/bin/bash
2
3# If git is working in other process, then don't sync again
4pidof git >/dev/null && exit 0
5
6# my repo
7sync() {
8 {
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`
12}
13sync $SETTING_DIR &
14sync ~/log &
15sync ~/blog &
16sync ~/git/vps &
17sync ~/.task &
18sync ~/.password-store &
19sync ~/.vim/vim-init &
20sync ~/bean &
21
22while true; do
23 if test $(jobs -r | wc -l) -gt 0; then
24 sleep 1;
25 else
26 which notify-send &>/dev/null && notify-send 'Repos synced'
27 break
28 fi
29done &
30
31# others repo
32#check_upstream ~/git/tig || echo in `pwd` >/dev/tty &
33
34# thunderbird
35#if [[ `cat /etc/hostname` != 'vultr' ]]; then
36# rsync -a pham@topo.tw:~/.thunderbird/ ~/.thunderbird &
37#fi