Allow running the component script without prior installation.
authorGunnar Wrobel <p@rdus.de>
Tue, 21 Sep 2010 20:52:26 +0000 (22:52 +0200)
committerGunnar Wrobel <p@rdus.de>
Tue, 21 Sep 2010 20:52:26 +0000 (22:52 +0200)
components/package.xml
components/script/horde-components.php

index 52a8d06..14c4f05 100644 (file)
@@ -80,7 +80,9 @@
     <file name="Components.php" role="php" />
    </dir> <!-- /lib -->
    <dir name="script">
-    <file name="horde-components.php" role="script" />
+    <file name="horde-components.php" role="script">
+     <replace from="@php_dir@" to="php_dir" type="pear-config"/>
+    </file>
    </dir> <!-- /script -->
    <dir name="test">
     <dir name="Components">
index 22e54b2..082046c 100755 (executable)
@@ -1,4 +1,8 @@
 #!/usr/bin/env php
 <?php
+if (strpos('@php_dir@', '@php_dir') === 0) {
+    set_include_path(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path());var_dump(get_include_path());
+}
+
 require_once 'Horde/Autoloader/Default.php';
 Components::main();