diff options
Diffstat (limited to 'post-apt.d/40git-rm')
-rwxr-xr-x | post-apt.d/40git-rm | 12 |
1 files changed, 7 insertions, 5 deletions
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 |