Exemple #1
0
 /**
  * Checks which files in the base kernel must be copied
  *
  * @return boolean
  */
 protected function checkKernelFiles()
 {
     $configured = $this->recursiveProcess(realpath(__DIR__ . '/../ext/kernel'), 'ext/kernel', '@^.*\\.c|h$@', array($this, 'checkKernelFile'));
     if (!$configured) {
         $this->logger->output('Copying new kernel files...');
         exec("rm -fr ext/kernel/*");
         $this->recursiveProcess(realpath(__DIR__ . '/../ext/kernel'), 'ext/kernel', '@^.*\\.c|h$@');
     }
     return !$configured;
 }
Exemple #2
0
 /**
  * Checks which files in the base kernel must be copied
  *
  * @return boolean
  */
 protected function checkKernelFiles()
 {
     $kernelPath = "ext/kernel";
     if (!file_exists($kernelPath)) {
         $kernelDone = mkdir($kernelPath, 0775, true);
         if (!$kernelDone) {
             throw new Exception("Cannot create kernel directory");
         }
     }
     $kernelPath = realpath($kernelPath);
     $sourceKernelPath = $this->backend->getInternalKernelPath();
     $configured = $this->recursiveProcess($sourceKernelPath, $kernelPath, '@.*\\.[ch]$@', array($this, 'checkKernelFile'));
     if (!$configured) {
         $this->logger->output('Copying new kernel files...');
         $this->recursiveDeletePath($kernelPath, '@^.*\\.[lcho]$@');
         @mkdir($kernelPath);
         $this->recursiveProcess($sourceKernelPath, $kernelPath, '@^.*\\.[ch]$@');
     }
     return !$configured;
 }