]> git.donarmstrong.com Git - bin.git/blobdiff - update_org_ical
add mutt alias which executes neomutt if that exists
[bin.git] / update_org_ical
index c60652070526380cfb1a759f7cd37c87d2ebc860..83237a7cc1139e6f33dca3c5094d0cc0b4c8a725 100755 (executable)
@@ -1,17 +1,29 @@
 #!/bin/bash
 
+HOSTNAME=$(hostname)
 TMPDIR=~/tmp
 export TMPDIR
-. ~/.ssh/ssh_agent_info_$(hostname)
+. ~/.ssh/ssh_agent_info_${HOSTNAME}
 LOCKOPTS=-q
 if [ -n "$PS1" ]; then
     LOCKOPTS=-f;
 fi;
-with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1
-yes|with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical emacs --batch -l ~/.emacs \
+
+if [ "$HOSTNAME" = "rzlab" ]; then
+    with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical timeout -k1m 1m mr -d ~/projects/org-notes up;
+else
+    with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical timeout -k1m 1m emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1
+fi;
+yes|with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical timeout -k1m 3m emacs --batch -l ~/.emacs \
+    --eval "(setq org-confirm-babel-evaluate nil)" \
     --eval '(setq org-icalendar-combined-description "Don Armstrong’s Calendar (org-mode)")' \
     --eval '(setq org-icalendar-combined-name "Don Armstrong (org-mode)")' \
     --eval "(setq org-icalendar-combined-agenda-file \"$TMPDIR/org.ics\")" \
+    --eval "(setq org-icalendar-exclude-tags '( \"habit\" ) )" \
     --eval '(org-icalendar-combine-agenda-files)' \
     --eval '(org-save-all-org-buffers)';
-with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical rsync -av "$TMPDIR/org.ics" rzlab.ucr.edu:debian/.google_ical*/org.ics
+if [ "$HOSTNAME" = "rzlab" ]; then
+    with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical timeout -k1m 1m rsync -av "$TMPDIR/org.ics" debian/.google_ical*/org.ics
+else
+    with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical timeout -k1m 1m rsync -av "$TMPDIR/org.ics" rzlab.ucr.edu:debian/.google_ical*/org.ics
+fi;