本文整理汇总了PHP中PhpBrew\Config::getBuildPrefix方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::getBuildPrefix方法的具体用法?PHP Config::getBuildPrefix怎么用?PHP Config::getBuildPrefix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhpBrew\Config
的用法示例。
在下文中一共展示了Config::getBuildPrefix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: patch
public function patch($build, $options)
{
if ($this->check($build)) {
$this->logger->info("---> Moving php.dSYM to php ");
if (!$options->dryrun) {
$dSYM = $build->getBinDirectory() . DIRECTORY_SEPARATOR . 'php.dSYM';
$buildPrefix = Config::getBuildPrefix();
$php = $buildPrefix . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'php';
rename($dSYM, $php);
}
}
}
示例2: execute
public function execute()
{
// $currentVersion;
$root = Config::getPhpbrewRoot();
$home = Config::getPhpbrewHome();
$buildDir = Config::getBuildDir();
$buildPrefix = Config::getBuildPrefix();
// $versionBuildPrefix = Config::getVersionBuildPrefix($version);
// $versionBinPath = Config::getVersionBinPath($version);
if (!file_exists($root)) {
mkdir($root, 0755, true);
}
touch($root . DIRECTORY_SEPARATOR . '.metadata_never_index');
// prevent spotlight index here
if ($root != $home) {
touch($home . DIRECTORY_SEPARATOR . '.metadata_never_index');
}
if ($this->options->{'config'} !== null) {
copy($this->options->{'config'}, $root . DIRECTORY_SEPARATOR . 'config.yaml');
}
if (!file_exists($home)) {
mkdir($home, 0755, true);
}
if (!file_exists($buildPrefix)) {
mkdir($buildPrefix, 0755, true);
}
if (!file_exists($buildDir)) {
mkdir($buildDir, 0755, true);
}
// write bashrc script to phpbrew home
file_put_contents($home . '/bashrc', $this->getBashScript());
echo <<<EOS
Phpbrew environment is initialized, required directories are created under
{$home}
Paste the following line(s) to the end of your ~/.bashrc and start a
new shell, phpbrew should be up and fully functional from there:
source {$home}/bashrc
To enable PHP version info in your shell prompt, please set PHPBREW_SET_PROMPT=1
in your `~/.bashrc` before you source `~/.phpbrew/bashrc`
export PHPBREW_SET_PROMPT=1
For further instructions, simply run `phpbrew` to see the help message.
Enjoy phpbrew at \$HOME!!
EOS;
}