Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ std-gram.ext
tools/sections
*.synctex.gz
*.synctex*
.check.stamp
9 changes: 9 additions & 0 deletions source/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ clean-examples:
rm -f $(EXAMPLES)

examples: $(EXAMPLES)

check: .check.stamp

.check.stamp: ../tools/check-source.sh *.tex
@echo "Running tools/check-source.sh"
@../tools/check-source.sh
@touch $@

.PHONY: default refresh refresh full quiet clean-figures figures clean-examples examples check
13 changes: 13 additions & 0 deletions tools/gitconfig.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
#!/bin/sh
git config diff.orderFile .gitorder
git config diff.c++draft.xfuncname '\\rSec[0-9]+(\[.*\])\{'

precommit="$(git rev-parse --git-dir)/hooks/pre-commit"

test -f "${precommit}" && exit
read -p "Install 'make check' pre-commit hook? [Y/n] " hook
if [ -z "${hook}" -o "${hook}" = "y" -o "${hook}" = "Y" ]; then
cat <<EOF > "${precommit}"
#!/bin/sh
cd \$(git rev-parse --show-toplevel)/source
make check
EOF
chmod +x "${precommit}"
fi