]> git.donarmstrong.com Git - bin.git/blobdiff - update_mobile_org
only source ssh_agent_info if it exists
[bin.git] / update_mobile_org
index 3f54a16aa387e2615cc84dc8cec15c42444e3047..e9af90c88b6807d2e82691a370355ec0ad2ae4ae 100755 (executable)
@@ -3,7 +3,9 @@
 HOSTNAME=$(hostname)
 TMPDIR=~/tmp
 export TMPDIR
-. ~/.ssh/ssh_agent_info_${HOSTNAME}
+if [ -e . ~/.ssh/ssh_agent_info_${HOSTNAME} ]; then
+    . ~/.ssh/ssh_agent_info_${HOSTNAME}
+fi;
 LOCKOPTS=-q
 LOCKFILE=$TMPDIR/update_mobile_org
 if [ -n "$PS1" ]; then
@@ -12,7 +14,7 @@ fi;
 LOCKIT="with-lock-ex $LOCKOPTS $LOCKFILE"
 TIMEOUT="timeout -k1m 1m"
 ${LOCKIT} ${TIMEOUT} mr -d ~/org-mode up;
-if [ "$HOSTNAME" = "rzlab" ]; then
+if [ "$HOSTNAME" = "linnode" ]; then
     ${LOCKIT} ${TIMEOUT} mr -d ~/projects/org-notes up;
 else
     ${LOCKIT} ${TIMEOUT} emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1;