From ada2b183fdbe0abcad45d8c37f012c20dbb6d692 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 18 Apr 2022 13:49:18 +0800 Subject: Update --- Makefile | 7 ++++--- tools/init/sync.sh | 10 ++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a6eb2be..7e2cb58 100644 --- a/Makefile +++ b/Makefile @@ -77,10 +77,11 @@ openbox: ln -sf `pwd`/misc/openbox/rc.xml ~/.config/openbox/ xkb: - sudo cat >/etc/profile.d/xkb.sh </etc/profile.d/xkb.sh </dev/null + #EOF setxkbmap -option ctrl:nocaps 2>/dev/null - EOF urlview: ln -sf `pwd`/misc/urlview ~/.urlview diff --git a/tools/init/sync.sh b/tools/init/sync.sh index 15663f0..6dd57ba 100755 --- a/tools/init/sync.sh +++ b/tools/init/sync.sh @@ -1,12 +1,12 @@ #!/bin/bash # If git is working in other process, then don't sync again -! pidof git && exit 0 +pidof git >/dev/null && exit 0 # my repo sync() { { cd $1 && [[ -n $(git remote -v) ]] || return; } 2>/dev/null - git pull --quiet || echo in `pwd` >/dev/tty + git pull --quiet || echo Has trouble when syncing `pwd` >/dev/tty } sync $SETTING_DIR & sync ~/blog & @@ -15,6 +15,12 @@ sync ~/.task & sync ~/.password-store & sync ~/.vim_runtime & +while [ $(jobs -r | wc -l) -gt 0 ]; do + sleep 1; +done + +notify-send 'Repos synced' + # others repo #check_upstream ~/git/tig || echo in `pwd` >/dev/tty & -- cgit v1.2.3-70-g09d2