From 35a4d072c7b6ff0242911a5f8db19251a52f39cc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 5 Aug 2016 18:58:15 +0200 Subject: php-pear: improve default configuration (avoid change in scriplet) --- cleanup.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 cleanup.php (limited to 'cleanup.php') diff --git a/cleanup.php b/cleanup.php new file mode 100644 index 0000000..9dde7c8 --- /dev/null +++ b/cleanup.php @@ -0,0 +1,33 @@ + [ + '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"); + -- cgit