blob: a2fcd2f311c8cc2f8019794b0fb8120ff6654808 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/sh
set -e
cd ~/doc/
# This is a shell script in my crontab rather than an Emacs timer because we
# also want to use it as the myrepos autoci action for ~/doc/.
# If emacs is running, try to save all ~/doc/ buffers.
[ -n "$LOGNAME" ] && pgrep -u "$LOGNAME" emacs >/dev/null \
&& emacsclient --eval '(spw/save-my-doc-buffers)'
# don't do anything if waiting on a manual merge; don't want just
# blanket commit that merge
[ -z "$(git ls-files --unmerged)" ] || exit 0
# this command should never fail and stop mr
git add org/*.org \
papers/*.org papers/*.md papers/*.bib \
newpapers/*/*.org \
dissert/*.md pres/*.md letters/*.tex \
emacs-abbrevs emacs-bookmarks News/* \
emacs-diary archive/emacs-diary-* \
notes/days/*.org notes/*.org \
|| true
# this command should never fail and stop mr
git commit -a -m "auto commit on $(hostname -s)" || true
|