Rev 9377 | Go to most recent revision | Details | 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 | |||
13 | # TODO: Make build.py remove the stuff it built |
||
14 | |||
15 | # Remove files copied from _tools/workspace |
||
16 | tools = os.path.dirname(os.path.realpath(__file__)) |
||
17 | tools_workspace = os.path.join(tools, "workspace") |
||
18 | for copied_script in os.listdir(tools_workspace): |
||
19 | if os.path.exists(copied_script): |
||
20 | os.remove(copied_script)> |
||
21 |