Skip to content

Commit 1d19067

Browse files
authored
Fully simplify and fix mfc.sh clean (#524)
1 parent c6a94d4 commit 1d19067

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

mfc.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ elif [ "$1" '==' "docker" ]; then
3636
shift; . "$(pwd)/toolchain/bootstrap/docker.sh" $@; exit 0
3737
elif [ "$1" '==' "venv" ]; then
3838
shift; . "$(pwd)/toolchain/bootstrap/python.sh" $@; return
39+
elif [ "$1" '==' "clean" ]; then
40+
rm -rf "$(pwd)/build"; exit 0
3941
fi
4042

4143
mkdir -p "$(pwd)/build"

toolchain/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __checks():
4949

5050
def __run():
5151
{"test": test.test, "run": run.run, "build": build.build,
52-
"clean": build.clean, "bench": bench.bench, "count": count.count,
52+
"bench": bench.bench, "count": count.count,
5353
"packer": packer.packer, "count_diff": count.count_diff, "bench_diff": bench.diff
5454
}[ARG("command")]()
5555

toolchain/mfc/build.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import os, typing, hashlib, dataclasses, shutil
1+
import os, typing, hashlib, dataclasses
22

33
from .printer import cons
4-
from .common import MFC_ROOTDIR, MFCException, system, delete_directory, create_directory, \
4+
from .common import MFCException, system, delete_directory, create_directory, \
55
format_list_to_string
66
from .state import ARG, CFG
77
from .run import input
@@ -286,7 +286,3 @@ def build(targets = None, case: input.MFCInputFile = None, history: typing.Set[s
286286

287287
if len(history) == 0:
288288
cons.print(no_indent=True)
289-
290-
291-
def clean():
292-
shutil.rmtree(os.path.join(MFC_ROOTDIR, 'build'))

0 commit comments

Comments
 (0)