update readme

This commit is contained in:
shenjack 2023-07-08 11:32:58 +08:00
parent a71e51ed9c
commit d3612685fc

View File

@ -51,13 +51,17 @@ compiler = CompilerHelper("main.py", run_after_build=True)
print(compiler) print(compiler)
if '-y' in sys.argv or '--yes' in sys.argv:
do_run = True
while (do := input("compile? [y/n]").lower()) not in ["y", "n", "yes", "no"]: elif '-n' in sys.argv or '--no' in sys.argv:
do_run = False
else: # do_run is None
while (do_run := input("compile? [y/n]").lower()) not in ["y", "n", "yes", "no"]:
# 获取用户输入是否编译 # 获取用户输入是否编译
# get user confirmation to compile or not # get user confirmation to compile or not
do_run = True if do_run[0] == "y" else False
if do_run:
do = do[0] subprocess.run(compiler.gen_subprocess_cmd())
``` ```