# -*- coding: utf-8 -*- from .__load__ import * # git实时更新 class Git(object): def __init__(self): self.share = '/share/lib/' self.web = self.share + 'web/' def update(self): path = self.web files = File.getFiles(path) if files: for i in files: file = path + i + '/.git/' if File.exists(file): self.pull(path, i, file) def pull(self, path, name, file): path = path + name + '/' Shell.popen('cd ' + path + ' && git pull')