@argh_named("update-config")
    @arg_verbose
    @argh.arg('config', type=str, help="target config (regexp)")
    @argh.arg('source', help='source file or directory', nargs="+")
    @expects_obj
    def handle_update_config(self, arg):
        confman = self.get_confman(arg.root_dir)
        configs = list(confman.find_config(arg.config))
        if not configs:
            raise errors.UserError("no config matching %r found" % arg.config)

        for source_path in arg.source:
            for conf_node, conf in configs:
                if arg.verbose:
                    self.log.info("%s: added %r", conf.full_name,
                                  str(source_path))
                if os.path.isfile(source_path):
                    shutil.copy2(source_path, conf.path)
                elif os.path.isdir(source_path):
                    assert 0, "unimplemented"
                else:
                    raise errors.UserError("don't know how to handle: %r (cwd: %s)" %
                                           (str(source_path), os.getcwd()))
update files to a config
dataset/ETHPy150Open ohmu/poni/poni/tool.py/Tool.handle_update_config