From 0c78418dbd1162d7d3daa9f15a36e1cf906846cb Mon Sep 17 00:00:00 2001
From: Bruce Eckel <BruceTEckel@gmail.com>
Date: Wed, 3 Jun 2015 23:40:33 -0700
Subject: [PATCH] Add *.class check

---
 tools/update_git.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/update_git.py b/tools/update_git.py
index 60c5c826..8feb5972 100644
--- a/tools/update_git.py
+++ b/tools/update_git.py
@@ -29,6 +29,9 @@ def copy_to_git():
     "Write togit.bat to copy missing files to git directory"
     exclude = ["Book.txt", "Git.txt", "togit.bat"]
     os.chdir(str(examplePath))
+    if list(examplePath.rglob("*.class")):
+        print("Run Ant clean First")
+        sys.exit(1)
     with Path("togit.bat").open("w") as togit:
         tocopy = [e for e in book if e not in git]
         for e in exclude: