]> git.donarmstrong.com Git - bin.git/blob - update_org_ical
use timeout
[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 timeout -k1m 1m emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1
11 yes|with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical timeout -k1m 3m 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     --eval "(setq org-icalendar-exclude-tags '( \"habit\" ) )" \
16     --eval '(org-icalendar-combine-agenda-files)' \
17     --eval '(org-save-all-org-buffers)';
18 with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical timeout -k1m 1m rsync -av "$TMPDIR/org.ics" rzlab.ucr.edu:debian/.google_ical*/org.ics