2021-12-03 19:37:11 +03:00
|
|
|
#!/usr/bin/python3
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import shutil
|
|
|
|
|
2021-12-04 12:29:17 +03:00
|
|
|
import workspace.build
|
|
|
|
|
2021-12-03 19:37:11 +03:00
|
|
|
# Remove workspace folder
|
|
|
|
shutil.rmtree("workspace", ignore_errors = True)
|
|
|
|
|
2021-12-04 00:20:06 +03:00
|
|
|
# Remove tup database
|
|
|
|
shutil.rmtree(".tup", ignore_errors = True)
|
|
|
|
|
2021-12-04 12:29:17 +03:00
|
|
|
# Make build.py remove the stuff it built
|
|
|
|
workspace.build.clean()
|
2021-12-03 19:37:11 +03:00
|
|
|
|
|
|
|
# Remove files copied from _tools/workspace
|
|
|
|
tools = os.path.dirname(os.path.realpath(__file__))
|
|
|
|
tools_workspace = os.path.join(tools, "workspace")
|
|
|
|
for copied_script in os.listdir(tools_workspace):
|
|
|
|
if os.path.exists(copied_script):
|
|
|
|
os.remove(copied_script)
|
|
|
|
|