def list_platforms(root_dir):
"""
???????????????
"""
def is_platform(dir):
"""
????version.lua???????????????????
"""
with quiet():
return run('test -f "{}/{}/version.lua"'.format(root_dir, dir)).succeeded
with cd(root_dir), hide('stdout'):
result = run('''find ./ -mindepth 1 -maxdepth 1 -type d -print |grep --color=never -vE '([0-9]+(\.[0-9]+){3}\\b)|(lyServers)' ''')
dirs = [each.lstrip('./') for each in result.splitlines()]
return [each for each in dirs if is_platform(each)]
评论列表
文章目录