Projects
Eulaceura:Mainline
php-pear
_service:obs_scm:cleanup.php
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:cleanup.php of Package php-pear
<?php # # Usage: php cleanup.php /path/to/pear.conf /usr/share # $file = $_SERVER['argv'][1]; $data = $_SERVER['argv'][2]; # Keys to be removed if exists $remove = [ 'ext_dir', 'http_proxy', ]; # Keys to be added $add = [ '__channels' => [ 'pecl.php.net' => [ 'doc_dir' => "$data/doc/pecl", 'test_dir' => "$data/tests/pecl", ] ] ]; $input = file_get_contents($file); list($header, $config) = explode("\n", $input); $config = unserialize($config); foreach ($remove as $key) unset($config[$key]); $config = array_merge($config, $add); $config = serialize($config); file_put_contents($file, "$header\n$config");
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2