From d489a8159dff05faa16d13c58a15bd363dbd9594 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Aug 2013 10:57:46 -0400 Subject: more generic name for variable as file does not contain patterns in git case --- pre-commit.d/30store-metadata | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'pre-commit.d/30store-metadata') 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 -- cgit v1.2.3