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