function installFlavor($flavor)
 {
     if (isset($this->installed[$flavor->getName()])) {
         return;
     }
     $logger = $this->getLogger();
     $homePath = Path::get_home_flavor_path();
     Helper::mktree($homePath);
     $logger->info("Installing " . $flavor->getName() . "...");
     Helper::copy_dir($flavor->__toString(), $homePath . DIRECTORY_SEPARATOR . $flavor->getName(), function ($target) use($logger) {
         $logger->info("Installing " . $target, 1);
     });
     // get dependencies
     $generator = $flavor->getGenerator();
     $depGenerators = $generator->getDependencies();
     foreach ($depGenerators as $depGenerator) {
         $this->installFlavor($depGenerator->getFlavor());
     }
 }