def _install_plugins_from_container()

in container-images/gerrit-init/tools/gerrit-initializer/initializer/tasks/download_plugins.py [0:0]


    def _install_plugins_from_container(self):
        source_dir = "/var/plugins"
        for plugin in self.required_plugins:
            source_file = os.path.join(source_dir, plugin + ".jar")
            target_file = os.path.join(self.plugin_dir, plugin + ".jar")
            if os.path.exists(target_file) and self._get_file_sha(
                source_file
            ) == self._get_file_sha(target_file):
                continue

            shutil.copyfile(source_file, target_file)
            self.plugins_changed = True