]> git.donarmstrong.com Git - bin.git/blob - update_org_ical
save org mode buffers before calling update_org_files and update_org_ical
[bin.git] / update_org_ical
1 #!/bin/bash
2
3 TMPDIR=~/tmp
4 export TMPDIR
5 . ~/.ssh/ssh_agent_info_$(hostname)
6 LOCKOPTS=-q
7 if [ -n "$PS1" ]; then
8     LOCKOPTS=-f;
9 fi;
10 with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1
11 with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical emacs --batch -l ~/.emacs \
12     --eval '(setq org-icalendar-combined-description "Don Armstrong’s Calendar (org-mode)")' \
13     --eval '(setq org-icalendar-combined-name "Don Armstrong (org-mode)")' \
14     --eval "(setq org-icalendar-combined-agenda-file \"$TMPDIR/org.ics\")" \
15     --funcall 'org-icalendar-combine-agenda-files'
16 with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical rsync -av "$TMPDIR/org.ics" rzlab.ucr.edu:debian/.google_ical*/org.ics