summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Bronson <b.git@u32.net>2008-03-20 02:34:23 -0700
committerScott Bronson <b.git@u32.net>2008-03-20 02:34:23 -0700
commit13289a5dd6e7ed0dcb521948254b7deafd96217f (patch)
tree864129101aa9fc6cf56d34cc49e48d8bb8ff2196
parent20d7d55942b53bca4def251ce037fc84ff0f5e0d (diff)
Of course all filenames in .etckeeper should be surrounded by quotes.
-rwxr-xr-xpre-commit.d/30store-metadata10
1 files changed, 5 insertions, 5 deletions
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata
index 65040bf..c3927e0 100755
--- a/pre-commit.d/30store-metadata
+++ b/pre-commit.d/30store-metadata
@@ -33,20 +33,20 @@ generate_metadata() {
fi
# Find all files and directories that don't have root as the owner
- find $NOVCS \! -user root -exec stat --format="chown %U {}" {} \; \
+ find $NOVCS \! -user root -exec stat --format="chown %U '{}'" {} \; \
| sort | filter_unknown chown owner
# Find all files and directories that don't have root as the group
- find $NOVCS \! -group root -exec stat --format="chgrp %G {}" {} \; \
+ find $NOVCS \! -group root -exec stat --format="chgrp %G '{}'" {} \; \
| sort | filter_unknown chgrp group
# Find all directories that aren't 0755
find $NOVCS -type d \! -perm 0755 \
- -exec stat --format="chmod %a {}" {} \; | sort
+ -exec stat --format="chmod %a '{}'" {} \; | sort
# Find all files that aren't 0644 or 0755 (we can assume the VCS will
# maintain the executable bit).
find $NOVCS -type f \! -perm 0644 \! -perm 0755 \
- -exec stat --format="chmod %a {}" {} \; | sort
+ -exec stat --format="chmod %a '{}'" {} \; | sort
# We don't handle xattrs.
# Maybe check for getfattr/setfattr and use them if they're available?
@@ -62,7 +62,7 @@ if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ]; then
chmod 700 .etckeeper
fi
- echo "# Generated by etckeeper." > .etckeeper
+ echo "# Generated by etckeeper. Do not edit." > .etckeeper
echo >> .etckeeper
generate_metadata >> .etckeeper