aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-04-25 11:27:26 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-04-25 11:27:26 +0800
commita205875bdc46b83b29ea3d52f371fa0ac1f73252 (patch)
treebf0210a450514c3c520fc27f3a966a0c14e0a800 /bin
parent3366366bf61dd819c874be78ae873a5d6e0e99d2 (diff)
Update
Diffstat (limited to 'bin')
-rwxr-xr-xbin/init/sync.sh12
-rwxr-xr-xbin/wakeup.sh4
2 files changed, 7 insertions, 9 deletions
diff --git a/bin/init/sync.sh b/bin/init/sync.sh
index bcd7bed..ffd91c0 100755
--- a/bin/init/sync.sh
+++ b/bin/init/sync.sh
@@ -10,14 +10,10 @@ sync() {
10 } 2>/dev/null 10 } 2>/dev/null
11 GIT_SSH_COMMAND="ssh -o ControlMaster=no" git pull --quiet || echo Has trouble when syncing `pwd` 11 GIT_SSH_COMMAND="ssh -o ControlMaster=no" git pull --quiet || echo Has trouble when syncing `pwd`
12} 12}
13sync $SETTING_DIR & 13
14sync ~/log & 14while read repo; do
15sync ~/blog & 15 sync $repo &
16sync ~/git/vps & 16done <~/.repos
17sync ~/.task &
18sync ~/.password-store &
19sync ~/.vim/vim-init &
20sync ~/bean &
21 17
22while true; do 18while true; do
23 if test $(jobs -r | wc -l) -gt 0; then 19 if test $(jobs -r | wc -l) -gt 0; then
diff --git a/bin/wakeup.sh b/bin/wakeup.sh
index 9f6d7a2..188f749 100755
--- a/bin/wakeup.sh
+++ b/bin/wakeup.sh
@@ -11,7 +11,9 @@ find $SETTING_DIR/bin -type f -executable -exec realpath {} + | \
11xargs -I{} ln -sf {} $BIN_DIR 11xargs -I{} ln -sf {} $BIN_DIR
12 12
13# sync with important git repos 13# sync with important git repos
14setsid ~/bin/check-repos.sh 14setsid ~/bin/sync.sh && \
15which notify-send &>/dev/null && \
16notify-send 'Repos synced'
15 17
16# Copy context file from vps 18# Copy context file from vps
17rsync -au vps:~/.context ~/.context 19rsync -au vps:~/.context ~/.context