Re: pre-configure post-install script

From: Date: Mon, 10 Nov 2008 22:18:48 +0000
Subject: Re: pre-configure post-install script
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29423@lists.php.net to get a copy of this message
On Mon, Nov 10, 2008 at 4:05 PM, Jack Bates <ms419@freezone.co.uk> wrote: > > I want to provide all the answers to a PEAR post-install script in > advance, so that the script will run without user interaction. How can I > do this? > > I am trying to write a script to install and configure a PEAR package. > Currently the script looks like: > > #!/bin/sh > > pear config-create /home/qubitadmin .pearrc > pear/pear channel-discover pear.qubit-toolkit.org > pear/pear install qubit/icaatom-devel > pear/pear run-scripts qubit/icaatom > > However the "run-scripts" step prompts for answers to a bunch of > questions. I want to supply the answers in my script, so that the script > runs without user interaction. Since the post-installation scripts are PHP, I would make a .php file which instantiates and executes the post-install script class directly. Just supply your answers as an associative array to the relevant methods in the post-install-script. For example: <?php require_once 'UNL/UCBCN/UNL_UCBCN_Manager_setup.php'; $manager = new UNL_UCBCN_Manager_setup_postinstall(); $manager->createFiles(array('docroot' => '/srv/www/vhosts/events.unl.edu/manager', 'template' => 'default')); -- Brett Bieber

« previous php.pear.general (#29423) next »