예제 #1
0
 function FileUpadter()
 {
     FileSystemObject::setRoot(dirname(__FILE__));
     $d = new Dir('files');
     $fu = new FileUpdater($d->getDir('source/includes'), $d->getDir('target/includes'), $d->getDir('backup/includes'));
     $command = ArgsHolder::get()->shiftCommand();
     if ($command == 'cdo') {
         $fu->copyDo();
     } elseif ($command == 'cundo') {
         $fu->copyUndo();
     } elseif ($command == 'undo') {
         $fu->undo();
     } elseif ($command == 'do') {
         $fu->run();
     } else {
         io::out('command not found');
     }
 }
예제 #2
0
파일: FileTask.php 프로젝트: point/cassea
 static function undeploy($dir)
 {
     io::out('Undeploying => ~GRAY~' . substr($dir, strlen(Config::getInstance()->root_dir)) . '~~~: ');
     $fu = new FileUpdater(Dir::get(Config::getInstance()->root_dir, true), self::restoreTargetPath($dir), $dir);
     $fu->undo();
 }