blob: 0603d308b4be8f47f09694082b56698dfa1f680d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
set -e
if [ -e .hg/hgrc ] && grep "^\[hooks\]" .hg/hgrc; then
echo "etckeeper warning: [hooks] section in .hg/hgrc needs to be manually modified to run: etckeeper pre-commit `pwd`" >&2
else
touch
cat >>.hg/hgrc <<EOF
[hooks]
# pre-commit hook for etckeeper, to store metadata and do sanity checks
precommit = etckeeper pre-commit `pwd`
EOF
fi
|