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