diff options
author | Joey Hess <joey@kitenet.net> | 2013-08-28 10:57:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-08-28 10:57:46 -0400 |
commit | d489a8159dff05faa16d13c58a15bd363dbd9594 (patch) | |
tree | 9cd1b8bf937aec8091708be3d8d9cc135ba0c24e /pre-commit.d/30store-metadata | |
parent | e531483c37f208ea043f5c09e9988f73e9cc6dea (diff) |
more generic name for variable as file does not contain patterns in git case
Diffstat (limited to 'pre-commit.d/30store-metadata')
-rwxr-xr-x | pre-commit.d/30store-metadata | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata index 016204b..3bb52e5 100755 --- a/pre-commit.d/30store-metadata +++ b/pre-commit.d/30store-metadata @@ -21,19 +21,19 @@ filter_ignore() { esac if [ -n "$ignorefile" ] && [ -e "$ignorefile" ]; then - patternsfile="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )" + listfile="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )" case "$VCS" in darcs) - grep -v '^[[:space:]]*\(#\|$\)' "$ignorefile" > "$patternsfile" || true - grep -Evf "$patternsfile" + grep -v '^[[:space:]]*\(#\|$\)' "$ignorefile" > "$listfile" || true + grep -Evf "$listfile" ;; git) - git ls-files --others --ignore --directory > "$patternsfile" || true - grep -Fvf "$patternsfile" + git ls-files --others --ignore --directory > "$listfile" || true + grep -Fvf "$listfile" ;; esac - rm -f "$patternsfile" - unset patternsfile + rm -f "$listfile" + unset listfile else cat - fi |