3 if [ "x$1" == "xdoit" ]; then
6 # figure out if we should pull
8 if [ -n "$(git status --porcelain -u no)" ]; then
10 if [ -n "$(git symbolic-ref HEAD)" ]; then
11 # 3. no commits which are not in origin
12 if [ -n "$(git rev-list \"^$(git remote|head -n 1)\" HEAD)" ]; then
13 # 3. machine is currently inactive for more than 1 hour
14 if [ "$IDLE_TIME" -gt 3600 ]; then
24 if which xprintidle >/dev/null 2>&1; then
25 IDLE_TIME=$(($(xprintidle) / 1000 ));
27 IDLE_TIME="$IDLE_TIME" mr -d ~ -j5 run update_git_repos doit;