summaryrefslogtreecommitdiff
path: root/pre-commit.d
diff options
context:
space:
mode:
authorScott Bronson <b.git@u32.net>2008-03-13 17:27:55 -0700
committerScott Bronson <b.git@u32.net>2008-03-17 00:03:23 -0700
commitace739a0754d96b6d01a095e4ecff195226617e8 (patch)
tree503e2f75c06190139d590f048552aefcda191a47 /pre-commit.d
parent1deff7a3d8de37cba44d4e1cdf1af9f768ee6011 (diff)
Don't hard-code /etc, etckeeper might be managing another directory.
Diffstat (limited to 'pre-commit.d')
-rwxr-xr-xpre-commit.d/30store-metadata8
1 files changed, 4 insertions, 4 deletions
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata
index 5b8bd37..55f1272 100755
--- a/pre-commit.d/30store-metadata
+++ b/pre-commit.d/30store-metadata
@@ -20,27 +20,27 @@ if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ]; then
# Find all files and directories that don't have root as the owner
# Need to be sure UNKNOWN users and groups don't end up in the .fix-metadata
# file because chown and chgrp will choke on it.
- output=$(find /etc \! -user root -exec stat --format="chown %U {}" {} \; | sort)
+ output=$(find . \! -user root -exec stat --format="chown %U {}" {} \; | sort)
if [ -n "$output" ]; then
echo "$output" | grep "^chown UNKNOWN" >&2 || true
echo "$output" | grep -v "^chown UNKNOWN" >> .fix-metadata || true
fi
# Find all files and directories that don't have root as the group
- output=$(find /etc \! -group root -exec stat --format="chgrp %G {}" {} \; | sort)
+ output=$(find . \! -group root -exec stat --format="chgrp %G {}" {} \; | sort)
if [ -n "$output" ]; then
echo "$output" | grep "^chgrp UNKNOWN" >&2 || true
echo "$output" | grep -v "^chgrp UNKNOWN" >> .fix-metadata || true
fi
# Find all directories that aren't 0755
- find /etc -type d \! -perm 0755 -exec stat --format="chmod %a {}" {} \; \
+ find . -type d \! -perm 0755 -exec stat --format="chmod %a {}" {} \; \
| sort >> .fix-metadata
# Find all files that aren't either 0644 or 0755 (git keeps track of the
# executable bit so we don't have to). All the files in the
# /etc/.git/objects directory are 0444 so we'll specifically avoid it.
- find /etc -wholename /etc/.git -prune -o \
+ find . -wholename ./.git -prune -o \
-type f \! -perm 0644 \! -perm 0755 -exec stat --format="chmod %a {}" {} \; \
| sort >> .fix-metadata