Outputting to terminal after package install
| From: | Igor Feghali | Date: | Sun, 16 Nov 2008 17:34:20 +0000 |
| Subject: | Outputting to terminal after package install | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-51094@lists.php.net to get a copy of this message | ||
Hi there,
I am trying to find a way to echo some stuff after a package is
installed. I was talking to Christian today regarding postinstall task
but as far as I can tell its designed to do exactly the oposite: to
get some input from user instead of give some advice in the screen. To
be more clear that is what I was playing with:
on make package script:
<?php
$task = &$package->initPostInstallScript('postinstall.php');
$package->addPostInstallTask($task, 'postinstall.php');
?>
postinstall.php:
<?php
class postinstall_postinstall {
function init() { return true; }
function run() { $this->outputData('echo me'); }
}
?>
I couldn't find a way to get any reference to postinstall.php on
package.xml. Note that I didn't populate $task because I can only find
methods designed to get user input on PEAR_Task_Postinstallscript_rw
class.
My primary intention is to alert the user that some files got
installed to www_dir and so one could want to share this folder with a
web server.
Any hints on that ?
Regards,
Igor.