From a205875bdc46b83b29ea3d52f371fa0ac1f73252 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 25 Apr 2023 11:27:26 +0800 Subject: Update --- bin/init/sync.sh | 12 ++++-------- bin/wakeup.sh | 4 +++- 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() { } 2>/dev/null GIT_SSH_COMMAND="ssh -o ControlMaster=no" git pull --quiet || echo Has trouble when syncing `pwd` } -sync $SETTING_DIR & -sync ~/log & -sync ~/blog & -sync ~/git/vps & -sync ~/.task & -sync ~/.password-store & -sync ~/.vim/vim-init & -sync ~/bean & + +while read repo; do + sync $repo & +done <~/.repos while true; do 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 {} + | \ xargs -I{} ln -sf {} $BIN_DIR # sync with important git repos -setsid ~/bin/check-repos.sh +setsid ~/bin/sync.sh && \ +which notify-send &>/dev/null && \ +notify-send 'Repos synced' # Copy context file from vps rsync -au vps:~/.context ~/.context -- cgit v1.2.3-70-g09d2