6 if [ -e . ~/.ssh/ssh_agent_info_${HOSTNAME} ]; then
7 . ~/.ssh/ssh_agent_info_${HOSTNAME}
10 LOCKFILE=$TMPDIR/update_mobile_org
11 if [ -n "$PS1" ]; then
14 LOCKIT="with-lock-ex $LOCKOPTS $LOCKFILE"
15 TIMEOUT="timeout -k1m 1m"
16 ${LOCKIT} ${TIMEOUT} mr -d ~/org-mode up;
17 if [ "$HOSTNAME" = "linnode" ]; then
18 ${LOCKIT} ${TIMEOUT} mr -d ~/projects/org-notes up;
20 ${LOCKIT} ${TIMEOUT} emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1;
22 yes|${LOCKIT} timeout -k1m 5m emacs --batch -l ~/.emacs \
23 --eval '(org-mobile-push)' --eval '(org-mobile-pull)' --eval '(org-save-all-org-buffers)';
25 if [ "$HOSTNAME" = "rzlab" ]; then
26 ${LOCKIT} ${TIMEOUT} \
27 mr -d ~/projects/org-notes commit -m'org mobile automated commit and push';
29 ${LOCKIT} ${TIMEOUT} \
30 mr -d ~/org-mode commit -m'org mobile automated commit and push';