Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am lotheac on github.
* I am osqu (https://keybase.io/osqu) on keybase.
* I have a public key whose fingerprint is A06F 0B32 C94E B197 8A28 73C6 E422 FE9E E167 A8BA
To claim this, I am signing this object:
@lotheac
lotheac / pre-commit.sh
Created December 14, 2012 13:57
pre-commit hook to validate and lint puppet manifests. also checks other files for whitespace errors (git diff --check)
#!/bin/sh -e
#
# install to .git/hooks/pre-commit to syntax-check and style-check puppet
# manifests
unset tmpd changed_filelist
cleanup() {
[ -d "$tmpd" ] && rm -rf "$tmpd"
}
tmpd=`mktemp -d /tmp/puppet-precommit.XXXXXX`