diff options
author | Scott Bronson <b.git@u32.net> | 2008-03-20 02:37:26 -0700 |
---|---|---|
committer | Scott Bronson <b.git@u32.net> | 2008-03-20 02:37:26 -0700 |
commit | f45ff34100d7e3302ced6a3bdf46c15b5a1ac3b4 (patch) | |
tree | f06ea0111b4606f854becce5bf6293dc3d6f8af3 /pre-commit.d/30store-metadata | |
parent | 13289a5dd6e7ed0dcb521948254b7deafd96217f (diff) |
Simplify the store-metadata script by calling chmod every time.
Diffstat (limited to 'pre-commit.d/30store-metadata')
-rwxr-xr-x | pre-commit.d/30store-metadata | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata index c3927e0..93e1202 100755 --- a/pre-commit.d/30store-metadata +++ b/pre-commit.d/30store-metadata @@ -54,16 +54,13 @@ generate_metadata() { if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ]; then - # ensure the file exists so that it will list its own metadata - if [ ! -e .etckeeper ]; then - touch .etckeeper - # Make sure the file is not readable by others, since it can leak - # information about contents of non-readable directories in /etc. - chmod 700 .etckeeper - fi - echo "# Generated by etckeeper. Do not edit." > .etckeeper echo >> .etckeeper + + # Make sure the file is not readable by others, since it can leak + # information about contents of non-readable directories in /etc. + chmod 700 .etckeeper + generate_metadata >> .etckeeper # stage the file as part of the current commit |