當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Config::getBuildPrefix方法代碼示例

本文整理匯總了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);
         }
     }
 }
開發者ID:bensb,項目名稱:phpbrew,代碼行數:12,代碼來源:DSymTask.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;
    }
開發者ID:bensb,項目名稱:phpbrew,代碼行數:52,代碼來源:InitCommand.php


注:本文中的PhpBrew\Config::getBuildPrefix方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。