AutoNBI.py 文件源码

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

项目:autonbi 作者: bruienne 项目源码 文件源码
def prepworkdir(workdir):
    """Copies in the required Apple-provided createCommon.sh and also creates
        an empty file named createVariables.sh. We actually pass the variables
        this file might contain using environment variables but it is expected
        to be present so we fake out Apple's createNetInstall.sh script."""

    commonsource = os.path.join(BUILDEXECPATH, 'createCommon.sh')
    commontarget = os.path.join(workdir, 'createCommon.sh')

    shutil.copyfile(commonsource, commontarget)
    open(os.path.join(workdir, 'createVariables.sh'), 'a').close()

    if isHighSierra:
        enterprisedict = {}
        enterprisedict['SIU-SIP-setting'] = True
        enterprisedict['SIU-SKEL-setting'] = False
        enterprisedict['SIU-teamIDs-to-add'] = []

        plistlib.writePlist(enterprisedict, os.path.join(workdir, '.SIUSettings'))

# Example usage of the function:
# decompress('PayloadJava.cpio.xz', 'PayloadJava.cpio')
# Decompresses a xz compressed file from the first input file path to the second output file path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号