#!/bin/bash
+GIT_HOST="linnode"
+
HOSTNAME=$(hostname)
TMPDIR=~/tmp
export TMPDIR
-if [ -e . ~/.ssh/ssh_agent_info_${HOSTNAME} ]; then
+if [ -e ~/.ssh/ssh_agent_info_${HOSTNAME} ]; then
. ~/.ssh/ssh_agent_info_${HOSTNAME}
fi;
LOCKOPTS=-q
LOCKIT="with-lock-ex $LOCKOPTS $LOCKFILE"
TIMEOUT="timeout -k1m 1m"
${LOCKIT} ${TIMEOUT} mr -d ~/org-mode up;
-if [ "$HOSTNAME" = "linnode" ]; then
+if [ "$HOSTNAME" = "$GIT_HOST" ]; then
${LOCKIT} ${TIMEOUT} mr -d ~/projects/org-notes up;
else
${LOCKIT} ${TIMEOUT} emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1;
yes|${LOCKIT} timeout -k1m 5m emacs --batch -l ~/.emacs \
--eval '(org-mobile-push)' --eval '(org-mobile-pull)' --eval '(org-save-all-org-buffers)';
-if [ "$HOSTNAME" = "rzlab" ]; then
+if [ "$HOSTNAME" = "$GIT_HOST" ]; then
${LOCKIT} ${TIMEOUT} \
mr -d ~/projects/org-notes commit -m'org mobile automated commit and push';
fi;