--- /dev/null
+#!/bin/bash
+
+TMPDIR=~/tmp
+export TMPDIR
+. ~/.ssh/ssh_agent_info_$(hostname)
+LOCKOPTS=-q
+if [ -n "$PS1" ]; then
+ LOCKOPTS=-f;
+fi;
+with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical emacs --batch -l ~/.emacs \
+ --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\")" \
+ --funcall 'org-icalendar-combine-agenda-files'
+with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical rsync -av "$TMPDIR/org.ics" rzlab.ucr.edu:debian/.google_ical*/org.ics