8 if [ -e ~/.ssh/ssh_agent_info_${HOSTNAME} ]; then
9 . ~/.ssh/ssh_agent_info_${HOSTNAME}
12 LOCKFILE=$TMPDIR/update_mobile_org
13 if [ -n "$PS1" ]; then
16 LOCKIT="with-lock-ex $LOCKOPTS $LOCKFILE"
17 TIMEOUT="timeout -k1m 1m"
18 ${LOCKIT} ${TIMEOUT} mr -d ~/org-mode up;
19 if [ "$HOSTNAME" = "$GIT_HOST" ]; then
20 ${LOCKIT} ${TIMEOUT} mr -d ~/projects/org-notes up;
22 ${LOCKIT} ${TIMEOUT} emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1;
24 yes|${LOCKIT} timeout -k1m 5m emacs --batch -l ~/.emacs \
25 --eval '(org-mobile-push)' --eval '(org-mobile-pull)' --eval '(org-save-all-org-buffers)';
27 if [ "$HOSTNAME" = "$GIT_HOST" ]; then
28 ${LOCKIT} ${TIMEOUT} \
29 mr -d ~/projects/org-notes commit -m'org mobile automated commit and push';
31 ${LOCKIT} ${TIMEOUT} \
32 mr -d ~/org-mode commit -m'org mobile automated commit and push';