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

set -e

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} daily/*.md pres/*.md playlists/*.m3u emacs-abbrevs emacs-bookmarks mutt-aliases mutt-groups || true

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