63 if ($this->bearsamppConfRaw !==
false) {
73 if (!is_dir($this->currentPath)) {
76 if (!is_dir($this->symlinkPath)) {
80 if (!is_file($this->bearsamppConf)) {
83 if (!is_file($this->reposFile)) {
86 if (!is_file($this->exe)) {
89 if (!is_file($this->bash)) {
93 if (is_file($this->reposFile)) {
94 $this->repos = explode(PHP_EOL, file_get_contents($this->reposFile));
95 $rebuildRepos = array();
96 foreach ($this->repos as $repo) {
98 if (stripos($repo,
':') ===
false) {
107 $this->repos = $rebuildRepos;
120 global $bearsamppWinbinder;
122 if (!$this->enable) {
127 Util::logDebug(($sub > 0 ? str_repeat(
' ', 2 * $sub) :
'') .
'Update ' . $this->name .
' ' .
$version .
' config');
130 $bearsamppWinbinder->exec($this->
getBash(),
'--no-needs-console --hide --no-cd --command=' . $this->
getSymlinkPath() .
'/post-install.bat',
true);
133 $bearsamppWinbinder->exec($this->
getExe(),
'config --global core.autocrlf false',
true);
134 $bearsamppWinbinder->exec($this->
getExe(),
'config --global core.eol lf',
true);
149 if (file_exists($this->reposCacheFile)) {
150 $repos = file($this->reposCacheFile);
151 foreach (
$repos as $repo) {
152 array_push(
$result, trim($repo));
156 if (!empty($this->repos)) {
157 foreach ($this->repos as $repo) {
159 if (!empty($foundRepos)) {
160 foreach ($foundRepos as $foundRepo) {
161 array_push(
$result, $foundRepo);
166 $strResult = implode(PHP_EOL,
$result);
167 file_put_contents($this->reposCacheFile, $strResult);