]> git.donarmstrong.com Git - bin.git/blob - update_org_caldav
call update_org_files if we've made any changes
[bin.git] / update_org_caldav
1 #!/bin/bash
2
3 LOCKOPTS=-q
4 LOCKFILE=$TMPDIR/update_org_caldav
5 if [ -n "$PS1" ]; then
6     LOCKOPTS=-f;
7 fi;
8 LOCKIT="with-lock-ex $LOCKOPTS $LOCKFILE"
9 TIMEOUT="timeout -k6m 6m"
10 ${LOCKIT} ${TIMEOUT} mr -d ~/projects/org-notes up;
11
12 ${LOCKIT} ${TIMEOUT} nice -n 19 \
13           emacs --batch --no-init -l ~/org-caldav-setup.el \
14           >/dev/null 2>&1
15 ## update org files if we've made any changes
16 NO_SAVE_ORG_BUFFERS=1 ${LOCKIT} ${TIMEOUT} nice -n 19 \
17                    update_org_files "update_org_caldav";