diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2007-11-13 19:09:10 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2007-11-13 19:09:10 -0500 |
commit | 26a46bf2fd473122e53a3303226b093523d30bfd (patch) | |
tree | 12f7d4cd0594b371ac35f3bcf0ad4dd1a104ae8d /post-apt.d/30git-add | |
parent | 8824d34847c9ebe106c9e362b2d1af1b031217dc (diff) |
* 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.
Diffstat (limited to 'post-apt.d/30git-add')
-rwxr-xr-x | post-apt.d/30git-add | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/post-apt.d/30git-add b/post-apt.d/30git-add index 06504b4..79aa406 100755 --- a/post-apt.d/30git-add +++ b/post-apt.d/30git-add @@ -1,5 +1,7 @@ #!/bin/sh set -e -if ! git-add .; then - echo "etckeeper warning: git-add failed" >&2 +if [ -d .git ]; then + if ! git-add .; then + echo "etckeeper warning: git-add failed" >&2 + fi fi |