summaryrefslogtreecommitdiff
path: root/pre-commit.d/10warn-empty-directory
blob: ef70b72e28d2c60472637d853b1ced6e0a4e6a23 (plain)
1
2
3
4
5
6
7
#!/bin/sh
set -e
empty=$(find -type d -empty | grep -v /.git/) || true
if [ -n "$empty" ]; then
	echo "etckeeper warning: empty directories, not tracked by git:" >&2
	echo "$empty" >&2
fi