From 3d5241a316e3ff729b19b878b0841558120f75e9 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sat, 19 Nov 2016 10:40:37 -0800 Subject: [PATCH] Abstract out GIT_HOST --- update_mobile_org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/update_mobile_org b/update_mobile_org index e9af90c..6eb7c6c 100755 --- a/update_mobile_org +++ b/update_mobile_org @@ -1,5 +1,7 @@ #!/bin/bash +GIT_HOST="linnode" + HOSTNAME=$(hostname) TMPDIR=~/tmp export TMPDIR @@ -14,7 +16,7 @@ fi; 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; @@ -22,7 +24,7 @@ fi; 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; -- 2.39.2