build.py 文件源码

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

项目:Dahua-Firmware-Mod-Kit 作者: BotoX 项目源码 文件源码
def Handle_CramFS(self, Key):
        ExtractedDir = os.path.join(self.Source, Key + ".extracted")
        OrigPath = os.path.join(self.Source, Key + ".raw")
        DestPath = os.path.join(self.BuildDir, Key + ".raw")

        Binary = "mkcramfs"
        if self.CheckDependency(Binary):
            return 1

        # Need root to access all files.
        if self.Debug:
            self.Logger.debug(' '.join(["sudo", Binary, ExtractedDir, DestPath]))
            Result = subprocess.call(["sudo", Binary, ExtractedDir, DestPath])
        else:
            Result = subprocess.call(["sudo", Binary, ExtractedDir, DestPath], stdout=subprocess.DEVNULL)

        return Result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号