Esempio n. 1
0
 def write_files(self, command, output_dir, vars):
     template_dir = self.template_dir()
     if not os.path.exists(output_dir):
         print "Creating directory %s" % output_dir
         if not command.simulate:
             # Don't let copydir create this top-level directory,
             # since copydir will svn add it sometimes:
             os.makedirs(output_dir)
     copydir.copy_dir(template_dir, output_dir,
                      vars,
                      verbosity=command.verbose,
                      simulate=command.options.simulate,
                      interactive=command.interactive,
                      overwrite=command.options.overwrite,
                      indent=1,
                      use_cheetah=self.use_cheetah,
                      template_renderer=self.template_renderer)
Esempio n. 2
0
 def write_files(self, command, output_dir, vars):
     structure_dirs = self.structure_dir()
     if len(structure_dirs) > 0:
         if not os.path.exists(output_dir):
             print "Creating directory %s" % output_dir
             if not command.simulate:
                 os.makedirs(output_dir)
         for structure_dir in structure_dirs:
             copydir.copy_dir(structure_dir, output_dir,
                              vars,
                              verbosity=0,
                              simulate=command.options.simulate,
                              interactive=command.interactive,
                              overwrite=command.options.overwrite,
                              indent=1,
                              use_cheetah=self.use_cheetah,
                              template_renderer=self.template_renderer)