summaryrefslogtreecommitdiffstats
path: root/install-pear.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-08-13 11:37:18 +0200
committerRemi Collet <fedora@famillecollet.com>2012-08-13 11:37:18 +0200
commitd6499afdd87023a50f23047baf824956b2a0f1d2 (patch)
treed579f993f72309ca110e51792e4b73090d96f4f5 /install-pear.php
parentbdd7b954ad27bb276a0ef0a81d4640ea7e1dab66 (diff)
emove XML_RPC, move tests to /usr/share/tests/pear
Diffstat (limited to 'install-pear.php')
-rw-r--r--install-pear.php42
1 files changed, 31 insertions, 11 deletions
diff --git a/install-pear.php b/install-pear.php
index a8ca995..c06dc04 100644
--- a/install-pear.php
+++ b/install-pear.php
@@ -43,7 +43,7 @@ for ($i = 0; $i < sizeof($argv); $i++) {
if (preg_match('/package-(.*)\.xml$/', $bn, $matches) ||
preg_match('/([A-Za-z0-9_:]+)-.*\.(tar|tgz)$/', $bn, $matches)) {
$install_files[$matches[1]] = $arg;
- } elseif ($arg == '-a') {
+ } elseif ($arg == '-a' || $arg == '--cache') {
$cache_dir = $argv[$i+1];
$i++;
} elseif ($arg == '--force') {
@@ -54,30 +54,36 @@ for ($i = 0; $i < sizeof($argv); $i++) {
} elseif ($arg == '-ds') {
$suffix = $argv[$i+1];
$i++;
- } elseif ($arg == '-d') {
+ } elseif ($arg == '-d' || $arg == '--dir') {
$with_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-b') {
+ } elseif ($arg == '-b' || $arg == '--bin') {
$bin_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-c') {
+ } elseif ($arg == '-c' || $arg == '--config') {
$cfg_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-w') {
+ } elseif ($arg == '-w' || $arg == '--www') {
$www_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-p') {
+ } elseif ($arg == '-p' || $arg == '--php') {
$php_bin = $argv[$i+1];
$i++;
- } elseif ($arg == '-o') {
+ } elseif ($arg == '-o' || $arg == '--download') {
$download_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-t') {
+ } elseif ($arg == '-t' || $arg == '--temp') {
$temp_dir = $argv[$i+1];
$i++;
- } elseif ($arg == '-D') {
+ } elseif ($arg == '-A' || $arg == '--data') {
+ $data_dir = $argv[$i+1];
+ $i++;
+ } elseif ($arg == '-D' || $arg == '--doc') {
$doc_dir = $argv[$i+1];
$i++;
+ } elseif ($arg == '-T' || $arg == '--test') {
+ $test_dir = $argv[$i+1];
+ $i++;
} elseif ($arg == '--debug') {
$debug = 1;
} elseif ($arg == '--extremedebug') {
@@ -139,6 +145,16 @@ if (!empty($doc_dir)) {
$config->set('doc_dir', $doc_dir, 'default');
}
+// Data files
+if (!empty($data_dir)) {
+ $config->set('data_dir', $data_dir, 'default');
+}
+
+// Unit tests
+if (!empty($test_dir)) {
+ $config->set('test_dir', $test_dir, 'default');
+}
+
// User supplied a dir prefix
if (!empty($with_dir)) {
$ds = DIRECTORY_SEPARATOR;
@@ -146,8 +162,12 @@ if (!empty($with_dir)) {
if (empty($doc_dir)) {
$config->set('doc_dir', $with_dir . $ds . 'doc', 'default');
}
- $config->set('data_dir', $with_dir . $ds . 'data', 'default');
- $config->set('test_dir', $with_dir . $ds . 'test', 'default');
+ if (empty($data_dir)) {
+ $config->set('data_dir', $with_dir . $ds . 'data', 'default');
+ }
+ if (empty($test_dir)) {
+ $config->set('test_dir', $with_dir . $ds . 'test', 'default');
+ }
if (empty($www_dir)) {
$config->set('www_dir', $with_dir . $ds . 'htdocs', 'default');
}