summaryrefslogtreecommitdiff
path: root/web/bsu
blob: d00dee823e17b6c6c0ece63fdde5db494ca994ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# Bring Sally Up: make an update to Bring Sally Up, and it will create a commit 
# for that change. It won't push without `-u`, in case the commit can be
# amended.

FILEPATH="$HOME/web/www/gabbott.dev/gabbott.dev/blog/pushups/bring-sally-up.html"
ORIGHASH="$(sha256sum "$FILEPATH")"

nvim "$FILEPATH"
if [ "$(sha256sum "$FILEPATH")" = "$ORIGHASH" ] ; then
	echo "No changes made, hence no commit will be made"
	exit 0
else 
	git commit -m "Bring Sally Up: entry for $(date +%Y-%m-%d)"
	# TODO: handle `-u`.
fi