Exemplo n.º 1
0
 /**
  * Initialise the home directory:
  * - if not present, create it copying the content from the home-dist directory
  * - if present check if the home directory is up to date with the latest DeploYii version
  */
 public static function initHomeDir()
 {
     if (!self::$_initialised) {
         $home = self::getHomeDir();
         if (!is_dir($home)) {
             FileHelper::copyDirectory(__DIR__ . '/../home-dist', $home);
             @unlink($home . '/README.md');
             VersionManager::updateHomeVersion();
         } else {
             $homeVersion = VersionManager::getHomeVersion();
             VersionManager::checkHomeVersion($homeVersion);
         }
     }
     self::$_initialised = true;
 }