aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rwxr-xr-xtools/init/sync.sh10
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:
77 ln -sf `pwd`/misc/openbox/rc.xml ~/.config/openbox/ 77 ln -sf `pwd`/misc/openbox/rc.xml ~/.config/openbox/
78 78
79xkb: 79xkb:
80 sudo cat >/etc/profile.d/xkb.sh <<EOF 80 #sudo cat >/etc/profile.d/xkb.sh <<EOF
81 #! /bin/env bash 81 ##! /bin/env bash
82 #setxkbmap -option ctrl:nocaps 2>/dev/null
83 #EOF
82 setxkbmap -option ctrl:nocaps 2>/dev/null 84 setxkbmap -option ctrl:nocaps 2>/dev/null
83 EOF
84 85
85urlview: 86urlview:
86 ln -sf `pwd`/misc/urlview ~/.urlview 87 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 @@
1#!/bin/bash 1#!/bin/bash
2 2
3# If git is working in other process, then don't sync again 3# If git is working in other process, then don't sync again
4! pidof git && exit 0 4pidof git >/dev/null && exit 0
5 5
6# my repo 6# my repo
7sync() { 7sync() {
8 { cd $1 && [[ -n $(git remote -v) ]] || return; } 2>/dev/null 8 { cd $1 && [[ -n $(git remote -v) ]] || return; } 2>/dev/null
9 git pull --quiet || echo in `pwd` >/dev/tty 9 git pull --quiet || echo Has trouble when syncing `pwd` >/dev/tty
10} 10}
11sync $SETTING_DIR & 11sync $SETTING_DIR &
12sync ~/blog & 12sync ~/blog &
@@ -15,6 +15,12 @@ sync ~/.task &
15sync ~/.password-store & 15sync ~/.password-store &
16sync ~/.vim_runtime & 16sync ~/.vim_runtime &
17 17
18while [ $(jobs -r | wc -l) -gt 0 ]; do
19 sleep 1;
20done
21
22notify-send 'Repos synced'
23
18# others repo 24# others repo
19#check_upstream ~/git/tig || echo in `pwd` >/dev/tty & 25#check_upstream ~/git/tig || echo in `pwd` >/dev/tty &
20 26