示例#1
0
文件: Skel.plugin.php 项目: davbfr/cf
 public function skelUpdate()
 {
     Cli::enableHelp();
     Cli::pinfo("Update CF project");
     $srcdir = $this->getDir() . DIRECTORY_SEPARATOR . "project";
     $dstdir = ROOT_DIR;
     foreach (array("index.php", "setup", "README.md", ".htaccess", ".gitignore", "www/index.php", "www/.htaccess") as $file) {
         copy($srcdir . DIRECTORY_SEPARATOR . $file, $dstdir . DIRECTORY_SEPARATOR . $file);
     }
     $this->updateFiles();
     chmod(getcwd() . DIRECTORY_SEPARATOR . "setup", 0755);
     System::ensureDir(DATA_DIR);
     Cli::update();
 }