From 26a46bf2fd473122e53a3303226b093523d30bfd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 13 Nov 2007 19:09:10 -0500 Subject: * Add tests for /etc/.git not yet existing and avoid doing bad things. Closes: #451185 * If /etc/.git doesn't exist, display a suggestion to run etckeeper-init. --- post-apt.d/40git-rm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'post-apt.d/40git-rm') diff --git a/post-apt.d/40git-rm b/post-apt.d/40git-rm index 4a47435..01161ca 100755 --- a/post-apt.d/40git-rm +++ b/post-apt.d/40git-rm @@ -3,8 +3,10 @@ set -e TAB=" " -for file in $(git ls-files --deleted); do - if [ ! -d "$file" ]; then - git rm "$file" - fi -done +if [ -d .git ]; then + for file in $(git ls-files --deleted); do + if [ ! -d "$file" ]; then + git rm "$file" + fi + done +fi -- cgit v1.2.3