package.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:redcap_deployment 作者: ctsit 项目源码 文件源码
def deploy_language_to_build_space():
    source_dir = env.languages
    target_dir = env.builddir + "/redcap/languages"

    if re.match(r'^\[.+\]$', source_dir) is not None:
        for language in json.loads(env.languages):
            if os.path.exists(language):
                local("mkdir -p %s" % target_dir)
                local('cp %s %s' % (language, target_dir))
            else:
                abort("the language file %s does not exist" % language)
    elif local('find %s/*.ini -maxdepth 1 -type f | wc -l' % source_dir, capture = True) != '0':
        if os.path.exists(source_dir) and os.path.exists(target_dir):
            local('find %s/*.ini -maxdepth 1 -type f -exec rsync {} %s \;' %(source_dir, target_dir))
    else:
        print("Warning: The languages where not provided. English will be used by default.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号