def clean(mcu_switch=None, supress_output=False):
cmd = TOOLCHAIN_BASIC_CONFIGURE + ' '
if mcu_switch is None:
sphinx_build_dir = os.path.join('build', 'sphinx')
if os.path.isdir(sphinx_build_dir):
shutil.rmtree(sphinx_build_dir)
print "Successfully removed sphinx documentation"
else:
print 'Nothing to clean...'
return
elif mcu_switch == '-p' or mcu_switch == '-s' or mcu_switch == '-b' :
cmd += ' ' + mcu_switch + ' ' + 'clean'
else:
print 'Invalid clean argument: \'{}\''.format(mcu_switch)
sys.exit(1)
start_process(cmd, supress_output)
评论列表
文章目录