Subversion Repositories Kolibri OS

Rev

Rev 9371 | Rev 9379 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
9371 Boppan 1
#!/usr/bin/python3
2
import os
3
import sys
4
import shutil
5
 
6
if len(sys.argv) < 2 or sys.argv[1] != "--remove-everything":
7
    print(f"Please call `{sys.argv[0]} --remove-everything` if you really want to remove all your workspace files")
8
    exit()
9
 
10
# Remove workspace folder
11
shutil.rmtree("workspace", ignore_errors = True)
12
 
9377 Boppan 13
# Remove tup database
14
shutil.rmtree(".tup", ignore_errors = True)
15
 
9371 Boppan 16
# TODO: Make build.py remove the stuff it built
17
 
18
# Remove files copied from _tools/workspace
19
tools = os.path.dirname(os.path.realpath(__file__))
20
tools_workspace = os.path.join(tools, "workspace")
21
for copied_script in os.listdir(tools_workspace):
22
    if os.path.exists(copied_script):
23
        os.remove(copied_script)
24