summaryrefslogtreecommitdiff
path: root/bin/doccheckin
blob: a80481256fc4b2c6165e74ea7a9065b9e0aab6a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

set -e

# TODO should also save *.md files in ~/doc .. maybe just save all
# files under ~/doc?
save-org-buffers

cd ~/doc/

# don't do anything if waiting on a manual merge; don't want just
# blanket commit that merge
gstatus=$(git status)
if [[ $gstatus =~ 'You have unmerged paths.' ]]; then
    exit 0
fi

# this command should never fail and stop mr
git add org/{philos/,/}*.org papers/*.{org,md,bib} dissert/*.md daily/*.md pres/*.md playlists/*.m3u emacs-abbrevs emacs-bookmarks mutt-aliases mutt-groups notes/*.org || true

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