summaryrefslogtreecommitdiff
path: root/bin/doccheckin
blob: 7c09e8195f437cf0851a95cbc2f5f811d09ad0b8 (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
#!/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.
emacsclient --spw/no-start --eval '(spw/save-my-doc-buffers)'
emacsclient -sgdbmacs --spw/no-start --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 howm/*.org howm/*/*.org archive/howm/archive.org \
    papers/*.org papers/*.md papers/*.bib \
    newpapers/*/*.org \
    dissert/*.md pres/*.md letters/*.tex \
    howm/.howm-keys emacs-abbrevs emacs-bookmarks \
    News/*.SCORE emacs-diary archive/emacs-diary-* \
    || true

# this command should never fail and stop mr
git commit -a -m "auto commit on $(hostname -s)" || true