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
评论列表
文章目录