#!/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