X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=update_org_ical;h=7c8619c4b6d13145688606ac2a00fad22883d48c;hb=32dd5b77200d893951c21395995ffa942eca1d5f;hp=3f928d260933a9a87bf6ad8850787ca0640ddb2b;hpb=96c6760a82404074d81d044ecfd691b154dca092;p=bin.git diff --git a/update_org_ical b/update_org_ical index 3f928d2..7c8619c 100755 --- a/update_org_ical +++ b/update_org_ical @@ -1,16 +1,31 @@ #!/bin/bash +HOSTNAME=$(hostname) TMPDIR=~/tmp export TMPDIR -. ~/.ssh/ssh_agent_info_$(hostname) +if [ -e ~/.ssh/ssh_agent_info_${HOSTNAME} ]; then + . ~/.ssh/ssh_agent_info_${HOSTNAME} +fi; 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 -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\")" \ - --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 + --eval "(setq org-icalendar-exclude-tags '( \"habit\" ) )" \ + --eval '(org-icalendar-combine-agenda-files)' \ + --eval '(org-save-all-org-buffers)'; +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;