Пример #1
0
 /**
  * @inheritdoc
  */
 protected function copyToBinFolder($binDir)
 {
     FileSystem::createDir($binDir);
     $source = $this->targetDir . '/bin/casperjs';
     $target = $binDir . '/casperjs';
     Cli::makeSymbolicLink($source, $target);
 }
Пример #2
0
 /**
  * Copies the SlimerJS binary to the bin folder
  *
  * @param string $binDir
  * @throws \Canterville\RuntimeException
  */
 protected function copyToBinFolder($binDir)
 {
     FileSystem::createDir($binDir);
     $os = Helpers::getOS();
     if ($os === Helpers::OS_WINDOWS) {
         $source = $this->targetDir . '/slimerjs.bat';
         $target = $binDir . '/slimerjs.bat';
     } elseif (isset($os)) {
         $source = $this->targetDir . '/slimerjs';
         $target = $binDir . '/slimerjs';
     } else {
         throw new RuntimeException('Cannot copy binary file of SlimerJS. OS not detect.');
     }
     Cli::makeSymbolicLink($source, $target);
 }