/** * @inheritdoc */ protected function copyToBinFolder($binDir) { FileSystem::createDir($binDir); $source = $this->targetDir . '/bin/casperjs'; $target = $binDir . '/casperjs'; Cli::makeSymbolicLink($source, $target); }
/** * 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); }